audio icon indicating copy to clipboard operation
audio copied to clipboard

Add power_to_db and db_to_power.

Open will-rice opened this issue 2 years ago • 2 comments

🚀 The feature

Convert power spectrogram into db and the reverse.

Motivation, pitch

I'm working on replacing my Librosa usage with torchaudio and this is a missing function in torchaudio that I would like to contribute.

Alternatives

https://librosa.org/doc/0.10.1/generated/librosa.power_to_db.html#librosa.power_to_db https://librosa.org/doc/0.10.1/generated/librosa.db_to_power.html#librosa.db_to_power

Additional context

No response

will-rice avatar Oct 05 '23 17:10 will-rice

Hi @will-rice

Thanks for the suggestion. This is a reasonable addition, so feel free to open a PR.

mthrok avatar Oct 09 '23 01:10 mthrok

@mthrok I came across this while working on the tests and realized that the power_to_db functionality is already available. If it would be useful to separate the functions I could work on that, but otherwise it's probably safe to close this issue.

will-rice avatar Oct 09 '23 18:10 will-rice