question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Security handshake failed and speech recognition stops working

See original GitHub issue

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

pi@raspberrypi:~/smart-mirror $ npm run sonus

> smart-mirror@0.0.7 sonus /home/pi/smart-mirror
> node sonus.js

!h: 2
E1227 00:11:15.508035697    1888 handshake.c:128]            Security handshake failed: {"created":"@1482793875.507858875","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1482793875.507826480","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}
E1227 00:11:17.511256783    1885 handshake.c:128]            Security handshake failed: {"created":"@1482793877.511095482","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1482793877.511069961","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}
E1227 00:11:18.513975132    1885 handshake.c:128]            Security handshake failed: {"created":"@1482793878.513764665","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1482793878.513719300","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}
E1227 00:11:19.516665305    1885 handshake.c:128]            Security handshake failed: {"created":"@1482793879.516573118","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1482793879.516554004","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}

Configuration

pi@raspberrypi:~/smart-mirror $ ulimit -n
65536
pi@raspberrypi:~/smart-mirror $  node -v
v6.9.2
pi@raspberrypi:~/smart-mirror $ npm -v
3.10.9

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 https://github.com/grpc/grpc/issues/7985

Thanks in advance for your help !

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
evancohencommented, Jan 20, 2017

This is an issue with the google speech library, more specifically with the way that grpc handles ongoing connections: GoogleCloudPlatform/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
})
0reactions
evancohencommented, Apr 28, 2017

I believe this issue is now resolved. If it isn’t I can reopen 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Speech Recognition Setup Doesn't Work" Error on Windows
Broken microphone – Another cause for this Speech Recognition setup doesn't work error is that your microphone might be broken and not intact. ......
Read more >
Speech Recognition not Working Windows 10
Speech Recognition not working on Windows 10. ... launch the Settings app (Windows key + I), and head to Update & Security.
Read more >
[Fix] Voice recognition not working: Windows says no internet ...
You should check to see if the particular connection is okay, reset the router, and reconnect all of the devices before jumping to...
Read more >
Voice Typing Not Working on Windows 11? Here's How to Fix It
To enable the mic, launch the Settings app by pressing Win + I and navigate to Privacy & security > Microphone. Toggle the...
Read more >
Error when opening BigHand Speech Recognition document ...
FaultException: The request for security token could not be satisfied because authentication failed. at System.ServiceModel.Security.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found