In this project I do an introduction to speech to text via python and google api on windows 10. (It took me almost 4 days to figure out on how to get the speech to text working on windows).
The script file to do speech to text is :-
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Speak into the microphone")
audio = r.listen(source)
try:
print("Transcription: " +r.recognize_google(audio))
except sr.UnknownValueError:
print("Audio not understood")
except sr.RequestError as e:
print("Cannot obtain results; {0}". format(e))
Ещё видео!