Closed horiDemachiLab closed 5 years ago
@horiDemachiLab thank you for the thorough bug report! I'm digging into this now, and can confirm that I can reproduce the issue as you have described it.
I'm looking into if there might be an issue with how the IAM key is provisioned.
Specifically, the bug is caused by https://github.com/watson-developer-cloud/text-to-speech-nodejs/blob/master/app.js#L53
The first time that GET /api/v1/synthesize
's handler is called, transcript
is undefined
, so therefore assigning event handlers to it through transcript.on('response')
creates an error.
I'll keep looking into it and hopefully will have a PR with a fix soon.
This issue is fairly old and there hasn't been much activity on it. Closing, but please re-open if it still occurs.
hey, im having exact the same problem
Any progress on this? I am experiencing the same error
Overview I checked out demo project from https://github.com/watson-developer-cloud/text-to-speech-nodejs. I made .env file and input url and apikey that I got from my IBMCloud account. Then, run locally. Access from browser and click speak button. I got 500 error, and there were error message like screenshots. After few seconds error message disappear. I retried to click speak button, then run correctlly. I recognized that 500 error happens only first time when run localserver by "npm start".
Expected behavior Run locally, then click speak button first time, then run correctlly.
Actual behavior Run locally, then click speak button first time, there is 500 error and error message.
How to reproduce Checked out demo project from https://github.com/watson-developer-cloud/text-to-speech-nodejs. Follow the Readme and run locally, then click speak button.
Screenshots Before click speak button After click speak button Error message
Additional information:
Node
are you using?: 12.0.0