google-speech-to-text icon indicating copy to clipboard operation
google-speech-to-text copied to clipboard

FileNotFoundError occur

Open nim924 opened this issue 4 years ago • 1 comments

C:/Users/wh/speech/google_speech_to_text/video\TheSimpsons.mp4 TheSimpsons.ogg Traceback (most recent call last): File "auto_run.py", line 23, in auto_run(directory) File "auto_run.py", line 18, in auto_run transcribe_gcs(file_path) File "C:\Users\wh\speech\google_speech_to_text\goog.py", line 18, in transcribe_gcs upload_to_gcloud(bucket_name, source_file_name=audio_file_path + '.ogg', destination_blob_name=audio_file_name) File "C:\Users\wh\speech\google_speech_to_text\upload_to_gcloud.py", line 10, in upload_to_gcloud blob.upload_from_filename(source_file_name) File "C:\Users\wh\anaconda3\lib\site-packages\google\cloud\storage\blob.py", line 2336, in upload_from_filename with open(filename, "rb") as file_obj: FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/wh/speech/google_speech_to_text/video\TheSimpsons.ogg'

I dont know what should I do!

nim924 avatar Nov 17 '20 15:11 nim924

looks like the forward slash should have been a back slash

C:/Users/wh/speech/google_speech_to_text/video "\" TheSimpsons.mp4

or it was a file naming issue with the .mp4 ending

Naki21 avatar Jul 28 '21 06:07 Naki21