I am using the Node.JS Google Speech API option.
Everything works well and dandy until I dare to pass an array of parameters speech_context. When I try to use each of the following methods, the stream is interrupted, but there is no error . So I have nothing to diagnose.
I am passing an array of strings ["one", "two", "three"], following the documentation , so I count. My initial configuration is as follows:
const cf = {
config: {
encoding: 'LINEAR16',
sampleRate: 48000
}
}
I tried to cf.config.speech_context = ARRAY, cf.config.speech_context.phrases = ARRAY, cf.speech_context = ARRAYand cf.speech_context.phrases = ARRAY.
Again, I am not getting the error message and not getting the result. I get nothing. The original configuration by itself works .
This is with the base stream:
recognizeStream = speech.createRecognizeStream(cf)
.on('error', console.error)
.on('data', console.log)
? !