You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run the inference code on a audio file with a text prompt, after I provide the wav_path and the prompt, I get this error -
spectrogram = wav_processor(audio, sampling_rate=sr, return_tensors="pt")["input_features"]
File "../SALMONN/salmonn_env/lib/python3.10/site-packages/transformers/models/whisper/feature_extraction_whisper.py", line 364, in call
padded_inputs = padded_inputs.convert_to_tensors(return_tensors)
File "../SALMONN/salmonn_env/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 171, in convert_to_tensors
raise ValueError(
ValueError: Unable to create tensor, you should probably activate padding with 'padding=True' to have batched tensors with the same length.
I tried adding padding=True in the `spectrogram = wav_processor(audio, sampling_rate=sr, return_tensors="pt")["input_features"]' line, but does not help either, shows the same error
The text was updated successfully, but these errors were encountered:
I am trying to run the inference code on a audio file with a text prompt, after I provide the wav_path and the prompt, I get this error -
spectrogram = wav_processor(audio, sampling_rate=sr, return_tensors="pt")["input_features"]
File "../SALMONN/salmonn_env/lib/python3.10/site-packages/transformers/models/whisper/feature_extraction_whisper.py", line 364, in call
padded_inputs = padded_inputs.convert_to_tensors(return_tensors)
File "../SALMONN/salmonn_env/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 171, in convert_to_tensors
raise ValueError(
ValueError: Unable to create tensor, you should probably activate padding with 'padding=True' to have batched tensors with the same length.
I tried adding padding=True in the `spectrogram = wav_processor(audio, sampling_rate=sr, return_tensors="pt")["input_features"]' line, but does not help either, shows the same error
The text was updated successfully, but these errors were encountered: