abdeladim-s / subsai

🎞️ Subtitles generation tool (Web-UI + CLI + Python package) powered by OpenAI's Whisper and its variants 🎞️
https://abdeladim-s.github.io/subsai/
GNU General Public License v3.0
1.15k stars 96 forks source link

FileNotFoundError: [WinError 2] The system cannot find the file specified #98

Closed evanclue closed 5 months ago

evanclue commented 5 months ago

No matter what I do, it can't seem to find my video file. I've tried selecting it locally, I've tried uploading it, nothing works.

FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback:

File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\subsai\webui.py", line 555, in <module>
    run()
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\subsai\webui.py", line 548, in run
    webui()
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\subsai\webui.py", line 318, in webui
    subs = _transcribe(file_path, stt_model_name, model_config)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\caching\cache_utils.py", line 194, in wrapper
    return cached_func(*args, **kwargs)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\caching\cache_utils.py", line 223, in __call__
    return self._get_or_create_cached_value(args, kwargs)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\caching\cache_utils.py", line 248, in _get_or_create_cached_value
    return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\caching\cache_utils.py", line 302, in _handle_cache_miss
    computed_value = self._info.func(*func_args, **func_kwargs)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\subsai\webui.py", line 190, in _transcribe
    subs = subs_ai.transcribe(media_file=file_path, model=model)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\subsai\main.py", line 115, in transcribe
    return stt_model.transcribe(media_file)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\subsai\models\whisper_model.py", line 207, in transcribe
    audio = whisper.load_audio(media_file)
File "C:\Users\clue\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\whisper\audio.py", line 58, in load_audio
    out = run(cmd, capture_output=True, check=True).stdout
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1456, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
abdeladim-s commented 5 months ago

If you've used the global path to your file and didn't work then I think you have something wrong with your installation. Have you installed ffmpeg correctly as stated in the readme file ?

evanclue commented 5 months ago

Hello. The issue is that I used winget to install ffmpeg, which did not add ffmpeg to my command line for some reason. When I installed it using chocolatey, it worked fine. It might be a good idea to mention in the readme that winget installing ffmpeg does not work for this project.