with sr.Microphone() as source:
    audio = r.listen(source)
try:
    print('You said ' + r.recognize(audio))
except LookupError:
    print('Could not understand audio')
Как встроить Google Speech to Text API в программу Python?