[Errno 2] No such file or directory: 'ffmpeg'

I’m trying to host a wav2vec2 fine-tuned model on huggingface with a custom pipeline following this template

However, when trying to test the model from the Hosted inference API, I got this error
[Errno 2] No such file or directory: ‘ffmpeg’

I’m using these meta data on the model card


  • automatic-speech-recognition
    library_name: generic

Hi! And welcome to the community.
Did you install FFMpeg in your environment?

e.g. pip install ffmpeg

Hi and thanks for your reply.

I tried to add the ffmpeg to the requirements.txt file but still same error. Is there a way to specify system install not Python package as I believe ffmpeg needs to be installed to the OS hosting the inference API.

Yes you are right. It’s been a while since I had this issue.

So, python ffmpeg-python package doesn’t install ffmpeg itself. You have to install it manually on your machine. Take a look here:
Download FFmpeg

Another solution, and the one I ultimately chose, is to install ffmpeg on a win machine using choco. One of these two solutions should solve the issue for you.

choco install ffmpeg

Thanks. The issue is not in my machine I’m trying to host it to the HF repo. See the template above to get what I mean.