Skip to content
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

speech: improve error handling #451

Closed
broady opened this issue Aug 10, 2017 · 2 comments
Closed

speech: improve error handling #451

broady opened this issue Aug 10, 2017 · 2 comments
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@broady
Copy link
Contributor

broady commented Aug 10, 2017

Steps to reproduce:

$ cd nodejs-docs-samples/speech
$ node recognize.js sync recognize.js
ERROR: [TypeError: Cannot read property 'alternatives' of undefined]

(also note a healthy exit code)

@broady
Copy link
Contributor Author

broady commented Aug 10, 2017

$ for i in $(seq 10); do cat resources/audio.raw resources/quit.raw; done > resources/big.raw
$ node recognize.js stream resources/big.raw
/usr/local/google/home/cbro/src/github.com/GoogleCloudPlatform/nodejs-docs-samples/speech/recognize.js:383
          `Transcription: ${data.results[0].alternatives[0].transcript}`);
                                           ^

TypeError: Cannot read property 'alternatives' of undefined
    at null.<anonymous> (/usr/local/google/home/cbro/src/github.com/GoogleCloudPlatform/nodejs-docs-samples/speech/recognize.js:383:44)
    at emitOne (events.js:77:13)
    at emit (events.js:169:7)
    at addChunk (/usr/local/google/home/cbro/src/github.com/GoogleCloudPlatform/nodejs-docs-samples/speech/node_modules/readable-stream/lib/_stream_readable.js:284:12)
    at readableAddChunk (/usr/local/google/home/cbro/src/github.com/GoogleCloudPlatform/nodejs-docs-samples/speech/node_modules/readable-stream/lib/_stream_readable.js:271:11)
    at Readable.push (/usr/local/google/home/cbro/src/github.com/GoogleCloudPlatform/nodejs-docs-samples/speech/node_modules/readable-stream/lib/_stream_readable.js:238:10)
    at Duplexify._forward (/usr/local/google/home/cbro/src/github.com/GoogleCloudPlatform/nodejs-docs-samples/speech/node_modules/duplexify/index.js:163:26)
    at DestroyableTransform.onreadable (/usr/local/google/home/cbro/src/github.com/GoogleCloudPlatform/nodejs-docs-samples/speech/node_modules/duplexify/index.js:127:10)
    at emitNone (events.js:67:13)
    at DestroyableTransform.emit (events.js:166:7)
Exit code 1

@fhinkel
Copy link
Contributor

fhinkel commented Nov 8, 2018

If the issue still persists, please file it here. Thank you.

@fhinkel fhinkel closed this as completed Nov 8, 2018
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
ace-n pushed a commit that referenced this issue Nov 17, 2022
ace-n pushed a commit that referenced this issue Nov 17, 2022
ace-n pushed a commit that referenced this issue Nov 17, 2022
ace-n pushed a commit that referenced this issue Nov 17, 2022
ace-n pushed a commit that referenced this issue Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants