Unexpected error
I got FileNotFoundError even the file in the same directory
Hi Abdulrahman!
First, I recommend you to restart Kernel, clear the output cells, and then try re-executing the code again after ensuring all the required files are in the same location.
Kernel >> Restart and Clear Outputs
If this doesn't help, you can create a new notebook and do the procedure again from the start.
Here are some alternative approaches if this doesn't solve the problem:
Ensure the current working directory of your Jupyter Notebook matches the location of the file using the following lines of code:
import os
print(os.getcwd())
If the output directory is incorrect, set it to the correct one:
os.chdir('path_to_your_directory')
print(os.path.exists('speech_01.wav'))
or use the variable's name as done in the lessons (file_path
).
Furthermore, you can try to use an absolute path to specify its location.
result = model.transcribe('C:/path_to_file/speech_01.wav')
I hope this helps. Feel free to get back to us if the problem persists.
Best,
Ivan