0

I'm struggling to export the noise reduced audio using the noisereduce package in Python. I found the solution for reshaping the data on another post. Can anyone help?

def gate2(filename):
    data, rate = soundfile.read(filename)
    data = np.reshape(data, (2, -1))
    reduced_noise = noisereduce.reduce_noise(y=data, sr=rate)     # perform noise reduction
    soundfile.write('gated.wav', reduced_noise, rate, 'PCM_16')
    return
CrogMc
  • 1

0 Answers0