Created
May 1, 2020 15:26
-
-
Save portableant/797812d094b4ca559b4b78e918d03a78 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 as sr | |
filename = "2101.wav" | |
r = sr.Recognizer() | |
with sr.AudioFile(filename) as source: | |
# listen for the data (load audio to memory) | |
audio_data = r.record(source) | |
# recognize (convert from speech to text) | |
text = r.recognize_google(audio_data) | |
print(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment