StreamingDetectIntent
doesn't process audio after stream reset in node.js v14 & v16
#3539
Labels
api: dialogflow
Issues related to the Dialogflow API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
This issue is in regards to this context googleapis/nodejs-dialogflow-cx#178
Environment details
Issue
To process audio requests continuously, it was suggested to reset the
detectStream/requestStream
after receiving the response from Dialogflow CX server. This solution worked as expected for node.js v12. However, the same implementation failed for Node v14 & v16.So, when we call
detectStream.end()
(in all Node.js versions), we do receive an end callback which means that it is ending the connection but when we recreate a detectStream object (in v14, v16) we don't receive any error but not even able to receive any response (transcription/audio response) for the audio request being sent. This same implementation works for v12.Instead of calling
detectStream.end()
, I tried callingdetectStream.cancel()
and then recreated a detectStream object and now it is working as expected even for v14, v16. But in exchange we get a gRPC error "1 CANCELLED".Now my question is:
Why
detectStream.end()
is not working as expected in v14, v16 but works fine for v12?Is calling
detectStream.cancel()
is the right way to proceed?For code snippet please refer here googleapis/nodejs-dialogflow-cx#178
The text was updated successfully, but these errors were encountered: