evancohen / sonus

:speech_balloon: /so.nus/ STT (speech to text) for Node with offline hotword detection
MIT License
625 stars 79 forks source link

emit error from google speech #43

Closed jaumard closed 7 years ago

jaumard commented 7 years ago

When Google Speech return an error, it's not emitted by sonus and we didn't know what append. This PR fix that

evancohen commented 7 years ago

Thanks @jaumard! Good idea :)

jaumard commented 7 years ago

No problem :) I think there some other problem around error management, I have no result/feedback when I have slow network :/

evancohen commented 7 years ago

I've had a tough time consistently reproducing that, but I've seen odd behavior on a slow network as well. This fix addresses #34, but there might be more that we can do here for users with a slow connection - maybe just a configurable timeout?

jaumard commented 7 years ago

Hum in fact if I understand correctly the #34 that's what I fix with this PR, now sonus emit an error event with the error object given by the google speech module. But still have a problem in slow network maybe because it doesn't stop after a timeout and keep trying. So a configurable timeout should fix the problem but it must force quit the current connexion