fr0stn1k

Speech recognition RUS

Dec 18th, 2020
714
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. import speech_recognition as sr
  2.  
  3.  
  4. r = sr.Recognizer()
  5. with sr.Microphone() as source:
  6.     print('Скажите что-нибудь...')
  7.     audio = r.listen(source)
  8.  
  9. query = r.recognize_google(audio, language="ru-RU")
  10. print('Вы сказали ' + query.lower())
Advertisement
Add Comment
Please, Sign In to add comment