Created
February 27, 2019 13:53
-
-
Save jiansoo/de6e3c1e1d15600dcbf86fab44987035 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import speech_recognition | |
sr = speech_recognition | |
r = sr.Recognizer | |
class Recognise: | |
def detect(self): | |
import speech_recognition as sr | |
r = sr.Recognizer() | |
with sr.Microphone() as source: | |
print("Speak:") | |
audio = r.listen(source) | |
return r.recognize_google(audio) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment