I have written the following code which is supposed to put echo over an available sound file. Unfortunately the output is a very noisy result which I don't exactly understand. Can anybody help me with regard to this? Is there any skipped step?
#convolving a room impulse response function with a sound sample both of stereo type from scipy.io import wavfile inp = wavfile.read(sound_path + sound_file_name) IR = wavfile.read(IR_path + IR_file_name) if inp != IR: print "Size mismatch" sys.exit(-1) else: rate = inp print sound_file_name out_0 = fftconvolve(inp[:, 1], IR[:, 1]) out_1 = fftconvolve(inp[:, 1], IR[:, 1]) in_counter += 1 out = np.vstack((out_0, out_1)).T wavfile.write(sound_path + sound_file_name + '_echoed.wav', rate, out)