Example code, librosa.util.exceptions.ParameterError: Audio data must be floating-point #4978
Replies: 4 comments 1 reply
-
@nithinraok possibly a bug? |
Beta Was this translation helpful? Give feedback.
-
We don't have test cases to test diarization on samples not sampled at 16kHz, that was why it wasn't caught. Thanks for reporting. May be @tango4j can explain why this was done to load samples explicitly as int16. |
Beta Was this translation helpful? Give feedback.
-
@vaughantnrc Can you share the specification of the audio file that caused this error? type of wave file, sampling rate, bit depth etc. Preferably |
Beta Was this translation helpful? Give feedback.
-
Thank you for looking into this. This is what I get with
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I searched for exception "Audio data must be floating-point" but found no results.
I'm trying to run code that is more or less identical to this: https://github.com/NVIDIA/NeMo/tree/main/examples/speaker_tasks/diarization
Except with a .wav file. When I do so I get the following exception:
When I look at NeMo's source code, I see that the audio is explicitly loaded with type int16: https://github.com/NVIDIA/NeMo/blob/main/nemo/collections/asr/parts/utils/decoder_timestamps_utils.py#L231
What confuses me is that if I look at the history of librosa, I see that the check for integer types has existed for years: https://github.com/librosa/librosa/blob/main/librosa/core/audio.py
A quick glance at the functions in the stack did not turn up any conversion from int16 to float.
So my question is... Is this a bug? The code looks wrong to me, but I have trouble imagining that this issue has existed without being detected, especially when there is an example (linked above)?
In case it's pertinent:
pip install nemo-toolkit[asr]==1.11.0
Beta Was this translation helpful? Give feedback.
All reactions