Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self._execute_child(args, executable, preexec_fn, close_fds) Can not find the specified file [With Solution] #24

Open
ThomasWarn opened this issue May 27, 2023 · 1 comment

Comments

@ThomasWarn
Copy link

Traceback (most recent call last):
  File "C:\Users\UsernameHere\Desktop\PythonProjects\real-time-whisper\whisper_real_time-master\transcribe_demo3.py", line 158, in <module>
    main()
  File "C:\Users\UsernameHere\Desktop\PythonProjects\real-time-whisper\whisper_real_time-master\transcribe_demo3.py", line 130, in main
    result = audio_model.transcribe(temp_file, fp16=torch.cuda.is_available())
  File "C:\Users\UsernameHere\AppData\Local\Programs\Python\Python311\Lib\site-packages\whisper\transcribe.py", line 121, in transcribe
    mel = log_mel_spectrogram(audio, padding=N_SAMPLES)
  File "C:\Users\UsernameHere\AppData\Local\Programs\Python\Python311\Lib\site-packages\whisper\audio.py", line 140, in log_mel_spectrogram
    audio = load_audio(audio)
  File "C:\Users\UsernameHere\AppData\Local\Programs\Python\Python311\Lib\site-packages\whisper\audio.py", line 59, in load_audio
    out = run(cmd, capture_output=True, check=True).stdout
  File "C:\Users\UsernameHere\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\UsernameHere\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\UsernameHere\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1510, in _execute_child
    # no special security
FileNotFoundError: [WinError 2] The system cannot find the file specified

After troubleshooting, this indicates that FFMPEG is not found or not installed correctly. It should have been installed correctly via requirements.txt.

One dirty and quick mitigation is to download ffmpeg.exe, and add it to your environmental variables "PATH" variable for windows users.

@davabase
Copy link
Owner

davabase commented Jun 6, 2023

ffmpeg does not get installed by pip, you must explicitly install it separately for your system.
This is stated in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants