JarodMica / audiosplitter_whisper

MIT License
91 stars 35 forks source link

Exception has occurred: FileNotFoundError (Solution Included) #25

Open WaterPasta opened 5 months ago

WaterPasta commented 5 months ago

I used the installation method as shown in the YouTube tutorial line by line

Running split_audio.py threw this error

Exception has occurred: FileNotFoundError [Errno 2] No such file or directory: 'D:\ai\programs\audiosplitter_whisper\data\output\1.srt' File "D:\ai\programs\audiosplitter_whisper\split_audio.py", line 96, in extract_audio_with_srt subs = pysrt.open(srt_file) File "D:\ai\programs\audiosplitter_whisper\split_audio.py", line 150, in process_audio_files extract_audio_with_srt(audio_file_path, srt_file, speaker_segments_dir) File "D:\ai\programs\audiosplitter_whisper\split_audio.py", line 180, in main process_audio_files(input_folder, settings) File "D:\ai\programs\audiosplitter_whisper\split_audio.py", line 183, in main() FileNotFoundError: [Errno 2] No such file or directory: 'D:\ai\programs\audiosplitter_whisper\data\output\1.srt'

Additionally, the terminal was saying something about not having or not finding cublas64_12 (I can't remember exactly what it said)

The error is thrown because the program can't find the srt file, because it can't make the srt file, and this is caused by a mismatch of CUDA versions. Torch (or something) has CUDA 11, but the script (or whatever) needs CUDA 12. I'm not a programmer, I don't know exactly what is what. All I know is that I fixed it.

To fix this, do the following.

1) Download and install CUDA 12 https://developer.nvidia.com/cuda-12-0-0-download-archive 2) Navigate to "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\bin" 3) Copy cublas64_12.dll, cublasLt64_12.dll, cudart64_12.dll 4) Navigate to "...\audiosplitter_whisper\venv\Lib\site-packages\torch\lib" 5) Paste the dlls into this folder

Now when you run split_audio.py, it will be able to create the srt file, fixing the issue with not being able to find said file.