Improve Cognition of gTTS

Asked

Viewed 103 times

0

you can improve the cognition of gTTS with Python?

I am creating a project with emphasis on "voice recognition" for commands on the PC // Arduino // Rasp // others but I realized that when I speak something simple as just a "YES" it sometimes takes a long time to "stop" the shooting... Follow the lines of code I have from gTTS:

with SR.Microphone() as source:
    r   = SR.Recognizer()
    r.adjust_for_ambient_noise(source)
    audio = r.listen(source)
    os.system(beep)
    audio = r.listen(source)
os.system(boop)
with open(rec, 'wb') as song:
    song.write(audio.get_wav_data())
try:
    with open('/home/pi/bot/logs/yk12mmkiy78.db', 'a', errors = 'ignore') as datafile:
        datafile.write(r.recognize_google(audio, language="pt-BR") + ';')

For now he is writing what was said in a text file called yk12mmkiy78.db and sometimes even simple words he writes wrong it is possible to improve cognition and understanding?

1 answer

0

Hello, I have some experience with TTS and ASR in Asterisk PBX systems , Amazon Poly and Google Tts here in the company, and what we do to improve understanding and timing of the process is:

  • We avoid 'open speech', usually we map the intentions with the Ngram to make decisions more assertive for commands and you configure the accuracy because TTS and Asrs are not 100% efficient.

Example:
Spoken word : 'No', what the platform understands 'Bread'.

If you set the accuracy to 80% for example, the word "Bread" will be accepted as "No" within the intention you want to capture from the user.

  • Instead of opening the direct microphone, we record the user’s speech and cut (at runtime) if it stays too long (usually 2 seconds) before sending the audio to the transcriber platform (even to avoid costs).

  • I think you already use Google but still I’ll stress because for us it made a big difference. Google’s voice recognition is much more evolved into the Brazilian phonetics use -o.

I hope I’ve helped.

  • Carlos sorry it took me so long to give an answer, I didn’t quite understand the "it" where I should put it ?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.