0
我已经看过谷歌开发网站上的演示以及git hub https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/speech。谷歌云语音API:Nodejs
我的问题是如何传递语言参数?
我使用它是这样的:
var speech = require('@google-cloud/speech')({
projectId: 'xxxxxxxx',
keyFilename: 'xxxxxxx'
});
speech.recognize(file, {
encoding: 'FLAC',
sampleRate: 44100
}, function(err, transcript) {
if(err) {
throw err;
});
它可以识别英文演讲。根据我们的使用情况如何更改langugae?将感谢任何帮助。谢谢。
,我知道。但该选项在哪里?要传递语言代码 –
请在“sampleRate”之后添加此参数:44100 – Cassidy
谢谢。花了这么多小时:) –