resemble-ai / resemble-enhance

AI powered speech denoising and enhancement
https://huggingface.co/spaces/ResembleAI/resemble-enhance
MIT License
1.32k stars 134 forks source link

May I ask why the audio length after noise reduction is inconsistent #31

Open Marootc opened 3 months ago

Marootc commented 3 months ago

The duration of the denoised audio is inconsistent. May I ask what the problem is? I am currently working on saving the denoised audio locally, but there is a discrepancy between the denoised audio and the original audio `def denoise_audio(audio_path, output_path): dwav, sr = torchaudio.load(audio_path) dwav = dwav.mean(dim=0)
wavdenoised, = denoise(dwav, sr, device)
if wav_denoised.ndim == 1: wav_denoised = wav_denoised.unsqueeze(0)

wav_denoised_tensor = torch.from_numpy(wav_denoised.cpu().numpy())

sf.write(output_path, wav_denoised_tensor.T, 24000)`

![Uploading WX20240614-231737.png…]()

Marootc commented 3 months ago

WX20240614-231737