Voice to text

Hi @ElectricBoogie,

I was able to solve this with google speech to text api. Built the code in python and got the text back as an argument.

Python:

import speech_recognition as sr
def SpeechToText():
r= sr.Recognizer()
with sr.Microphone() as source:
Text= ‘Nothing’
print(‘say something’);
audio = r.listen(source)
print(‘Time over, Thanks’)
try:
Text = r.recognize_google(audio, language=“en-US”)
print('Text: '+r.recognize_google(audio, language=“en-US”));
except:
pass

return Text
1 Like