Monday, 1 May 2017

Google speech api, node.js client - wrong results when using 'operation'

I'm using the node.js client library, specifically the startRecognition method, and to get the results I use speech.operation. However, instead of the results I get the following - look at the "value" objects, that contain some encoded string rather than a JavaScript object.

{ result: 'response', name: '3939860839213416358', metadata: { typeUrl: 'type.googleapis.com/google.cloud.speech.v1.LongRunningRecognizeMetadata', value: 'CGQSCwiKx47IBRCg6pRuGgsIqM6OyAUQgO+vYQ==' }, done: true, error: null, response: { typeUrl: 'type.googleapis.com/google.cloud.speech.v1.LongRunningRecognizeResponse', value: 'EoQaCtICCsoCVGhleSBzbWFsbCBsYXRlc3QgZW52aXJvbm1lbnQuIFdlIGhhdmUgYSBjb3Jwb3JhdGUgYnVzaW5lc3Mgc2VydmljZSBhbmQgdGhlcmVmb3Jl' } }

Has anybody seen this? is it a bug? or is there a way to decode this into a JavaScript object?



via MirM

No comments:

Post a Comment