Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """ Antonio Villanueva Segura
- Extractor texto desde audio
- """
- import speech_recognition as sr
- audio="80m.live_2024-10-18T20_15_39Z_6993.00_usb.wav"
- re = sr.Recognizer()
- with sr.AudioFile(audio) as source:
- info_audio = re.record(source)
- texto=re.recognize_google(info_audio,language="es-ES")
- print(texto)
- file = open(audio+".txt","w")
- file.write(texto)
- #file.writelines(L)
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement