Sometime the Speech API stuck when I say only one word using streaming recognize. The API recognize the end of the sentence as I receive correctly END_OF_SINGLE_UTTERANCE, but I never receive the transcription with isFinal=true.
This is a big problem for me as I use isFinal to reload the API connection. I can reproduce the issue on both API v1 and v1p1beta1.
{ config:
{ encoding: 1,
sampleRateHertz: 8000,
languageCode: 'fr-FR',
maxAlternatives: 0,
profanityFilter: true },
singleUtterance: true,
interimResults: true }
{"results":[{"alternatives":[{"words":[],"transcript":"pour","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"Bonjour","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que ça","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que ça m'a","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que ça marche","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce","confidence":0}],"isFinal":false,"stability":0.8999999761581421},{"alternatives":[{"words":[],"transcript":" que ça marche","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que","confidence":0}],"isFinal":false,"stability":0.8999999761581421},{"alternatives":[{"words":[],"transcript":" ça marche bien","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que ça","confidence":0}],"isFinal":false,"stability":0.8999999761581421},{"alternatives":[{"words":[],"transcript":" marche bien","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que ça marche","confidence":0}],"isFinal":false,"stability":0.8999999761581421},{"alternatives":[{"words":[],"transcript":" bien","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que ça marche bien","confidence":0}],"isFinal":false,"stability":0.8999999761581421}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[],"error":null,"speechEventType":"END_OF_SINGLE_UTTERANCE"}
{"results":[{"alternatives":[{"words":[],"transcript":"bonjour est-ce que ça marche bien","confidence":0.9081912636756897}],"isFinal":true,"stability":0}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"un","confidence":0}],"isFinal":false,"stability":0.009999999776482582}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[{"alternatives":[{"words":[],"transcript":"un","confidence":0}],"isFinal":false,"stability":0.8999999761581421}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{"results":[],"error":null,"speechEventType":"END_OF_SINGLE_UTTERANCE"}
{"results":[],"error":{"details":[],"code":11,"message":"Exceeded maximum allowed stream duration of 65 seconds."},"speechEventType":"SPEECH_EVENT_UNSPECIFIED"}
{ Error: 11 OUT_OF_RANGE: Exceeded maximum allowed stream duration of 65 seconds.
at createStatusError (node_modules/grpc/src/client.js:64:15)
at ClientDuplexStream._emitStatusIfDone (node_modules/grpc/src/client.js:270:19)
at ClientDuplexStream._receiveStatus (node_modules/grpc/src/client.js:248:8)
at node_modules/grpc/src/client.js:804:12
code: 11,
metadata:
Metadata {
_internal_repr: { 'content-disposition': [Array], 'x-goog-trace-id': [Array] } },
details: 'Exceeded maximum allowed stream duration of 65 seconds.' }