Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Denoise an audio array (ndarray) instead of an audio file (mp3) #161

Open
d4rkc0de opened this issue Oct 7, 2023 · 0 comments
Open

Denoise an audio array (ndarray) instead of an audio file (mp3) #161

d4rkc0de opened this issue Oct 7, 2023 · 0 comments

Comments

@d4rkc0de
Copy link

d4rkc0de commented Oct 7, 2023

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'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant