Advertisement
AntonioVillanueva

Extractor Texto Audio

Oct 19th, 2024 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. """ Antonio Villanueva Segura
  2.     Extractor texto desde audio
  3. """
  4. import speech_recognition as sr
  5. audio="80m.live_2024-10-18T20_15_39Z_6993.00_usb.wav"
  6. re = sr.Recognizer()
  7.  
  8. with sr.AudioFile(audio) as source:
  9.  
  10.     info_audio = re.record(source)
  11.     texto=re.recognize_google(info_audio,language="es-ES")
  12.     print(texto)
  13.  
  14.  
  15.     file = open(audio+".txt","w")
  16.  
  17.  
  18.     file.write(texto)
  19.     #file.writelines(L)
  20.     file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement