(Audio classification pipeline) ValueError: ffmpeg was not found but is required to load audio files from filename
Greetings Huggingface community!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 directoryI get the following errorValueError: ffmpeg was not found but is required to load audio files from filenameI’m running all of this under a conda environment and made sure that ffmpeg was installed.Any assistance would be greatly appreciated
2022-04-28T22:46:44Z
I have the same issue, any update on that?
2022-04-29T10:52:41Z
For anyone encountering this issue, I found a solution. Apparently pythonffmpeg-pythonpackage doesn’t install ffmpeg itself so you have to install it manually on your machineDownload FFmpeg
2023-03-27T23:35:17Z
@AvienirHey, I am facing the same issue in Windows 10. So I downsload the ffmpeg and where should I place the files? Could you please help me?
2023-05-02T05:43:14Z
You can use choco in windows10，if you have，I usechoco install ffmpegsolve the problem.
2023-10-19T23:43:10Z
Installing ffmpeg also worked for me. I’m a mac user, and used brew to install ffmpeg.$ brew install ffmpeg
2023-11-16T06:26:06Z
I fixed it in Windows 11 by following steps:Uninstall ffmpegpip3 uninstall ffmpegpip3 uninstall ffmpeg-pythonpip uninstall ffmpegpip uninstall ffmpeg-pythonbrew uninstall ffmpegInstall ffmpeg binary usingthisguide.Install ffmpeg for pythonpip3 install ffmpegpip3 install ffmpeg-pythonpip install ffmpegpip install ffmpeg-pythonThat’s all it should work
2023-12-22T08:44:13Z
Also useful on win10
2023-12-22T10:37:12Z
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 workEdit :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 :[{'score': 0.9950760006904602, 'label': 'app_error'},
 {'score': 0.0014388954732567072, 'label': 'address'},
 {'score': 0.00135265220887959, 'label': 'high_value_payment'},
 {'score': 0.000736881687771529, 'label': 'card_issues'},
 {'score': 0.0003506052598822862, 'label': 'abroad'}]The expected result :[
    {"score": 0.9631525278091431, "label": "pay_bill"},
    {"score": 0.02819698303937912, "label": "freeze"},
    {"score": 0.0032787492964416742, "label": "card_issues"},
    {"score": 0.0019414445850998163, "label": "abroad"},
    {"score": 0.0008378693601116538, "label": "high_value_payment"},
]If you have any idea, I’m interested !Thank you
2024-07-16T08:51:31Z
I am also facing the same issue. Apparently ffmpeg is used for audio compression (?).  Is there anyway where we can pass on the uncompressed audio file in the pipeline.  My aim is to use it without ffmpeg being installed in the system. Faster-whisper package runs without ffmpeg in the system.Any other suggestions are also appreciated.Thanks in advance
2025-01-01T07:57:59Z
conda install ffmpegsolved it for me!