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

Dears,
I am running this " model.transcribe" code on windows machine . and get this error FileNotFoundError: [WinError 2] The system cannot find the file specified - tried full path file name but with no hope…
what is the solution . the path and the file are correct and located in target ed directory

model = whisper.load_model(“small”)

options = dict(task=“translate”, best_of=1, language=‘en’)

#results = model.transcribe(path_to_extracted_audio_file, **options)

#results = model.transcribe(‘D:/OneDrive/MultimodalRAGcourse/L3/shared_data/videos/video1/audio.mp3’, **options)

results = model.transcribe(r’D:\OneDrive\MultimodalRAGcourse\L3\shared_data\videos\video1\audio.mp3’, **options)

please share a screenshot of the error you have encountered.


this is the image

hi @omran

Did you download all the files from File==> Open section? Error is indicating the audio file doesn’t exist where it is looking for based on the path provided.

Regards
DP

image

the file path is correct --see the new image

D:\OneDrive\MultimodalRAGcourse\L3\shared_data\videos\video1\audio.mp3 == this is the copied file name from the system

error is not pointing to the path, but the audio file and in what format it is in place. check if course environment audio file format matches with the format you are using in your system.

this is the audio file generated from L3 …it is system generated

hi @omran

if you notice your first error which shows the file in audio.py file but if you noticed the image where you copied the files you have downloaded the audio file. Remember downloading of all files should be the same way it was in course environment. also if the L3 has requirements txt. file, you need to make sure you following module version too for the necessary codes to run successfully in your local environment.

I solved the problem by just
1-installing ffmpeg for windows as stated below

2- pip install ffmpeg

1 Like