I have seen demo on google dev site as well as on git hub https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/speech.
My question is how to pass language parameter ?
I am using it like this :
var speech = require('@google-cloud/speech')({
projectId: 'xxxxxxxx',
keyFilename: 'xxxxxxx'
});
speech.recognize(file, {
encoding: 'FLAC',
sampleRate: 44100
}, function(err, transcript) {
if(err) {
throw err;
});
It recognizes the speech in english. How to change that langugae as per our usage ? Will appreciate any help. Thanks.