-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security handshake failed and speech recognition stops working #26
Comments
Thanks for the detailed issue! I've seen similar problems when the Pi's clock is set incorrectly: evancohen/smart-mirror#468 According to the @google-cloud/speech documentation there isn't anything explicit that you have to do to "close" the connection - but if the issue is truly connection limits then that's a potential cause. I haven't personally experienced this issue, so it could be due to an update of the grpc library (we've had issues with dependencies breaking us in the past). It seems that there are other platforms having similar issues: grpc/grpc#8732 To complicate things further, it seems that @google-cloud/speech and its dependencies actually require 2 different versions of grpc (at least in my install):
I've got a pretty outdated version of @google-cloud/speech. You might try to manually install the version I'm using and see if that fixes the problem. In the meantime I'm going to install the latest version of the library and see if I can reproduce this. |
I got this same error, however it's the first time it has happened. Speech recognition stopped after that. This also happened in an app that was already running and not on startup. It's originating in the child process. Restarting the app made it work again. Using sonus v0.1.5 in an electron app(v1.4.14)
Any luck in recreating this error? |
I've been able to consistently recreate this error. I've tried this on four wifi networks A, B, C & D:
Looks like it might be a network issue of some sort? |
This is an issue with the google speech library, more specifically with the way that grpc handles ongoing connections: googleapis/google-cloud-node#1905 Seems like the workaround is to extend the time allowed when trying to reestablish a connection. This is something that doesn't require the modification of sonus to fix! I'm taking a bit of a guess here because I only glanced at the code, but if you construct your speech object like this before you pass it to Sonus it might fix your issue: const speech = require('@google-cloud/speech')({
projectId: 'streaming-speech-sample',
keyFilename: ROOT_DIR + 'keyfile.json',
"grpc.initial_reconnect_backoff_ms": 10000
}) |
I believe this issue is now resolved. If it isn't I can reopen :) |
Description
I encountered this random bug on the smart mirror project, but it seems to come from sonus.
When I try the sonus test command (see below)
case 1 : I say the hotword sonus detects it, I wait a while and sometimes if I say nothing I have an handshake error.
case 2 : I say the hotword sonus detects it, I wait a while and I say "hello" or something and then I have an handshake error.
case 3 : I say the hotword sonus detects it, I speak, everthing is going well, I wait a while and I say the hotword then I have an handshake error.
After that it can detect the hotword but it doesn't detect the speech anymore.
Everytime I have at least 3 handshake errors
Unfortunalty it s not easy to reproduce, even if it occurs very often.
How to reproduce
Configuration
Comments
I have this error on the smart-mirror master branch and on the dev branch too
I make sure to clean up everything with "git clean -xdf -e config.js" and "npm install" each time
Ideas
After some googling, some grpc users seems to have the same issues and it looks related to a connection limit but I only have the smart-mirror running ... so it's weird
grpc/grpc#7985
Thanks in advance for your help !
The text was updated successfully, but these errors were encountered: