Denoise an audio array (ndarray) instead of an audio file (mp3)
d4rkc0de opened this issue · comments
I have an audio array of type ndarray that I want to denoise, in the example notebooks it uses a mp3 file:
wav, sr = torchaudio.load('alex_noisy.mp3')
Can I do the same with an audio array ?
I tried:
audio_array = generate_audio(text_prompt)
wav = torch.from_numpy(audio_array)
wav = convert_audio(wav.cuda(), SAMPLE_RATE, model.sample_rate, model.chin)
but I got this error:
AttributeError: 'Tensor' object has no attribute 'channels'