Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielAlbuquerque/5f6536eccc9125eb79eb766fdaeece25 to your computer and use it in GitHub Desktop.
Save danielAlbuquerque/5f6536eccc9125eb79eb766fdaeece25 to your computer and use it in GitHub Desktop.
Type with Microphone with Python
import speech_recognition as sr
from pyautogui import press, typewrite, hotkey
r = sr.Recognizer()
with sr.Microphone() as source:
while True:
try:
audio = r.listen(source)
result = r.recognize_google(audio,language="pt-BR")
typewrite(result)
except:
print ("Eu nao entendi")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment