mirror of
https://github.com/domfelipe/ISA-Interface.git
synced 2026-08-07 05:06:46 +00:00
ISA_Files
This commit is contained in:
commit
187af137d6
25 changed files with 15496 additions and 0 deletions
17
main.py
Normal file
17
main.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import speech_recognition as sr
|
||||
# for index, name in enumerate(sr.Microphone.list_microphone_names()):
|
||||
# print("Microphone with name \"{1}\" found for `Microphone(device_index={0})`".format(index, name))
|
||||
|
||||
r = sr.Recognizer()
|
||||
with sr.Microphone(device_index=1) as fonte:
|
||||
print('Reconhecendo Áudio...')
|
||||
audio = r.listen(fonte)
|
||||
|
||||
texto = r.recognize_ibm(audio, language='pt-BR')
|
||||
|
||||
try:
|
||||
print('Áudio Reconhecido:' + texto.capitalize())
|
||||
|
||||
|
||||
except sr.UnknownValueError:
|
||||
print('Áudio não reconhecido, tentando novamente...')
|
||||
Loading…
Add table
Add a link
Reference in a new issue