Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created July 26, 2018 18:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
import speech_recognition as sr
recognizer = sr.Recognizer()
sr.Microphone.list_microphone_names()
mic = sr.Microphone(device_index=1)
with mic as source:
recognizer.adjust_for_ambient_noise(source)
audio = recognizer.listen(source)
recognizer.recognize_google(audio)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment