Skip to content

Instantly share code, notes, and snippets.

@paulohenriquesn
Created January 11, 2019 18:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save paulohenriquesn/1ae2101d9f9c3fcd51f9b0284807fbb7 to your computer and use it in GitHub Desktop.
Save paulohenriquesn/1ae2101d9f9c3fcd51f9b0284807fbb7 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