You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite passing an array to speechContext.phrases, I am getting the following error:
ERROR: TypeError: .google.cloud.speech.v1.RecognitionConfig.speechContexts: array expected
at Type.RecognitionConfig$fromObject [as fromObject] (eval at Codegen (/redacted/node_modules/@protobufjs/codegen/index.js:50:33), <anonymous>:55:9)
at Type.fromObject (/redacted/node_modules/protobufjs/src/type.js:538:25)
at Type.LongRunningRecognizeRequest$fromObject [as fromObject] (eval at Codegen (/redacted/node_modules/@protobufjs/codegen/index.js:50:33), <anonymous>:10:21)
at Type.fromObject (/redacted/node_modules/protobufjs/src/type.js:538:25)
at serialize (/redacted/node_modules/grpc/src/protobuf_js_6_common.js:70:23)
at ServiceClient.Client.makeUnaryRequest (/redacted/node_modules/grpc/src/client.js:544:17)
at apply (/redacted/node_modules/lodash/lodash.js:499:17)
at ServiceClient.wrapper (/redacted/node_modules/lodash/lodash.js:5356:16)
at /redacted/node_modules/@google-cloud/speech/src/v1/speech_client.js:175:39
at timeoutFunc (/redacted/node_modules/google-gax/lib/api_callable.js:171:12)
Environment details
OS: OSX v10.11.6
Node.js version: v8.11.1
npm version: 5.6.0
google-cloud-node version: 196.0.0
Steps to reproduce
Code is here, it's mostly copied straight from the documentation. I have other code generating the real array but I tested it with the simplest possible array for testing and still getting the same result.
constconfig={enableWordTimeOffsets: true,encoding: 'FLAC',sampleRateHertz: '16000',languageCode: 'en-GB',speechContexts: {phrases: ['dog','cat']}};constaudio={uri: 'gs://bucket/audio.flac'};constrequest={
config,
audio,};client.longRunningRecognize(request).then(data=>{constoperation=data[0];// Get a Promise representation of the final result of the jobreturnoperation.promise();}).then(data=>{constresponse=data[0];console.log(`${JSON.stringify(response,null,2)}`);}).catch(err=>{console.error('ERROR:',err);});
The text was updated successfully, but these errors were encountered:
Despite passing an array to speechContext.phrases, I am getting the following error:
Environment details
Steps to reproduce
Code is here, it's mostly copied straight from the documentation. I have other code generating the real array but I tested it with the simplest possible array for testing and still getting the same result.
The text was updated successfully, but these errors were encountered: