I have been following the examples in the docs, for the example of audio pipeline under the ‘Pipelines for inference’ tutorial, I tried out the follwing example:
from transformers import pipeline
audio_classifier = pipeline(task='audio-classification',model = \
"ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition")
audio_classifier("1.wav") # A .wav file stored locally in the same directory
I get the following error
ValueError: ffmpeg was not found but is required to load audio files from filename
I’m running all of this under a conda environment and made sure that ffmpeg was installed.
For anyone encountering this issue, I found a solution. Apparently python ffmpeg-python package doesn’t install ffmpeg itself so you have to install it manually on your machine Download FFmpeg
I’m on Visual Studio Code environment, and I have the same issue.
I did all the steps asked by jb-infivr, but I have the same error.
Thank you very much for the work
Edit :
I tried to modify the code using this : display(classifier(minds[0]['audio']['array']))
I don’t have errors anymore, but the output seems to not have a good answer :