rcbyron / hey-athena-client

Your personal voice assistant
https://heyathena.com
MIT License
421 stars 98 forks source link

Set maximum active listening time #13

Open rcbyron opened 8 years ago

rcbyron commented 8 years ago

In case the active listening stalls out, set a maximum time to cut off the active listening.

reflexity commented 8 years ago

I think this is a very good idea! Personally, I have quite some moments when the active listening keeps listening, almost forever. It is very frustrating ;) I know we have the ambient noise code in the STT script, but shouldn't we place specifically a timeout within the active listening function? Let's say for 10 seconds. Am I wrong about this? I am just throwing some suggestions.

loctruong96 commented 7 years ago

you can, go to the stt.py in athena folder, then change the following line on active_listening function from audio = r.listen(src) --------->To audio = r.record(src,duration = 4) it will only listen for 4 second. because athena uses speech_recognition api and they already did this. If you use google speech api, they max it out at 15 seconds for the duration of each request