Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created July 26, 2018 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/c8c2d6cead8904025aef48f8404f6b4b to your computer and use it in GitHub Desktop.
Save NMZivkovic/c8c2d6cead8904025aef48f8404f6b4b to your computer and use it in GitHub Desktop.
import speech_recognition as sr
recognizer = sr.Recognizer()
audiofile = sr.AudioFile('welcome_to_rubiks_code_dot_net.wav')
with audiofile as source:
recognizer.adjust_for_ambient_noise(source)
audio = recognizer.record(source)
recognizer.recognize_google(audio)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment