EnkrateiaLucca / openai_whisper

Python script for my article and Youtube video on building a streamlit app to use whisper for speech-to-text transcription
12 stars 5 forks source link

File not found #2

Open geekskaran opened 1 year ago

geekskaran commented 1 year ago

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

EnkrateiaLucca commented 1 year ago

Hey! Make sure the audio file is in the same folder as the app.

athiyaman-m commented 6 months ago

I kept the audio file in same project folder but still this same error occurs. How to solve it.?

FileNotFoundError: [WinError 2] The system cannot find the file specified Traceback: File "C:\Users\Asus\AppData\Roaming\Python\Python311\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 542, in _run_script exec(code, module.dict) File "C:\Users\Asus\Audio-To-Text-generation-webapp\app.py", line 16, in transcription = model.transcribe(audio_file.name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Asus\AppData\Roaming\Python\Python311\site-packages\whisper\transcribe.py", line 133, in transcribe mel = log_mel_spectrogram(audio, model.dims.n_mels, padding=N_SAMPLES) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Asus\AppData\Roaming\Python\Python311\site-packages\whisper\audio.py", line 140, in log_mel_spectrogram audio = load_audio(audio) ^^^^^^^^^^^^^^^^^ File "C:\Users\Asus\AppData\Roaming\Python\Python311\site-packages\whisper\audio.py", line 58, in load_audio out = run(cmd, capture_output=True, check=True).stdout ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Asus\anaconda3\Lib\subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Asus\anaconda3\Lib\subprocess.py", line 1024, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Asus\anaconda3\Lib\subprocess.py", line 1509, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^