Skip to content

Instantly share code, notes, and snippets.

@jiansoo
Created February 27, 2019 13:53
Show Gist options
  • Save jiansoo/de6e3c1e1d15600dcbf86fab44987035 to your computer and use it in GitHub Desktop.
Save jiansoo/de6e3c1e1d15600dcbf86fab44987035 to your computer and use it in GitHub Desktop.
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