Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vol silently clamps outputs to range [-1,1] #3730

Open
CookiePPP opened this issue Jan 16, 2024 · 0 comments
Open

Vol silently clamps outputs to range [-1,1] #3730

CookiePPP opened this issue Jan 16, 2024 · 0 comments

Comments

@CookiePPP
Copy link

CookiePPP commented Jan 16, 2024

馃摎 The doc issue

https://pytorch.org/audio/stable/generated/torchaudio.transforms.Vol.html

The current doc for torchaudio.transforms.Vol just says "Adjust volume of waveform." but it also clamps the output using torch.clamp(waveform, -1, 1) which can be hard to realise and debug (in my case, I have millions of audio files and around 10% of them had enough dynamic range to trigger this clipping, making it harder to reproduce, but still enough files to cause audio quality issues and disrupt training stability).

Suggest a potential alternative/fix

I would suggest adding a warning to the method that prints once if an output waveform has samples that will be clamped and updating the torchaudio doc to make it clear that the function clamps the output.

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

No branches or pull requests

1 participant