Guest User

Untitled

a guest
Jan 23rd, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. import speech_recognition as sr
  2.  
  3. r = sr.Recognizer()
  4. mic = sr.Microphone()
  5.  
  6. print('Recording...')
  7. with mic as source:
  8. audio = r.listen(source)
  9.  
  10. with open("audio_file.wav", "wb") as file:
  11. file.write(audio.frame_data)
Add Comment
Please, Sign In to add comment