![]() ![]() How can I add a part in which I take the file "video", cut into pieces of 5 minutes each, save them as. Print(r.recognize_google(audio, language="en-US")) With sr.AudioFile(transcribed_audio_file_name) as source:Īudio = r.record(source, offset=i*60, duration=60)į.write(r.recognize_google(audio, language="en-US")) ![]() Total_duration = math.ceil(duration / 60) ![]() With contextlib.closing(wave.open(transcribed_audio_file_name,'r')) as f: Transcribed_audio_file_name = FILE + "_transcribed_speech.wav"Īudioclip = AudioFileClip(mp4_video_file_name)Īudioclip.write_audiofile(transcribed_audio_file_name) C:/Users/User/DesktopįILE = "file_name" # e.g. Until now, I was able to write the following code to transcribe the initial (long) file: import wave, math, contextlib mp4) and then make Python transcribe each of them. I would like to make Python cut the files in 5-minutes new files (still in. I'm using wave, math, contextlib, speech_recognition and AudioFileClip libraries. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |