I load wav using the scipy wavefile.read () method, which gives me fetch and audio data
I know that this audio data, if the stereo is stored as a multidimensional array, such as
audiodata[[left right] [left right] ... [left right]]
Then I use this method to create a new array of monaural audio data using (right + left) / 2
def stereoToMono(audiodata) newaudiodata = [] for i in range(len(audiodata)): d = (audiodata[i][0] + audiodata[i][1])/2 newaudiodata.append(d) return np.array(newaudiodata, dtype='int16')
and then I will write this to a file using
wavfile.write(newfilename, sr, newaudiodata)
This creates a Mono wav file, however the sound is dirty and has a click, etc. in all
what am I doing wrong?
source share