Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenAI Whisper; FileNotFoundError: [WinError 2] The system cannot find the file specified

I wanted to check out OpenAI whisper and see if I could find some personal applications for it. I went on github and followed the instructions to set it up. My primary system is on Windows 11 and I get this error; "FileNotFoundError: [WinError 2] The system cannot find the file specified" when trying to run the test script on my system.

Things I did to troubleshoot:

  • Disabled MS defender and all antivirus.
  • Moved the script and audio file to the same directory.
  • Moved the script and audio file to various directories.
  • Ran VSCODE with admin privileges.
  • Tried the "command-line usage".
  • Tried everything above on a second system that run windows 10.
  • The script ran on a third system with Ubuntu installed.

I think this might be a permission issue from windows but I can't seem to resolve it, any suggestion will be greatly appreciated. I would prefer not to use the linux system because it lacks a dGPU.

like image 933
Gordon Freeman Avatar asked Sep 13 '25 16:09

Gordon Freeman


2 Answers

I initially ran into this same problem and it was entirely related to installing ffmpeg. You need to install it as a python module (with pip install ffmpeg) and from here (https://ffmpeg.org/download.html) while following these instructions: https://www.geeksforgeeks.org/how-to-install-ffmpeg-on-windows/

like image 79
David Gordon Avatar answered Sep 16 '25 06:09

David Gordon


It is happening due to the ffmpeg not working correctly or failed to load. Try running

ffmpeg -version

It should display something like this:- enter image description here

If you get this, it means your ffmpeg is working fine. If you are not getting these details then try installing using below command. Hopefully it should work.

conda install -c conda-forge ffmpeg

After installing via conda it works for me: enter image description here

like image 22
Vaibhav K Avatar answered Sep 16 '25 08:09

Vaibhav K