Skip to content

Instantly share code, notes, and snippets.

@tsu-nera
Created August 25, 2018 13:09
Show Gist options
  • Save tsu-nera/1dfb25a56098f28c79b567a44a0bc59b to your computer and use it in GitHub Desktop.
Save tsu-nera/1dfb25a56098f28c79b567a44a0bc59b to your computer and use it in GitHub Desktop.
音声認識スクリプト
import speech_recognition as sr
r = sr.Recognizer()
mic = sr.Microphone()
with mic as source:
r.adjust_for_ambient_noise(source)
audio = r.listen(source)
print(r.recognize_google(audio, language='ja-JP'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment