我在google站点和git https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/speech上都看到了演示。
我的问题是如何传递语言参数?
我就是这样用的:
var speech = require('@google-cloud/speech')({
projectId: 'xxxxxxxx',
keyFilename: 'xxxxxxx'
});
speech.recognize(file, {
encoding: 'FLAC',
sampleRate: 44100
}, function(err, transcript) {
if(err) {
throw err;
});它能识别英语中的讲话。如何根据我们的用法改变这种语言?会感谢你的帮助。谢谢。
发布于 2017-02-21 12:54:10
我相信你必须提供languageCode参数。有关支持语言的列表,请访问
https://cloud.google.com/speech/docs/languages
添加这样的languageCode:
speech.recognize(file, {
encoding: 'FLAC',
sampleRate: 44100,
languageCode : 'your_language_code'
}https://stackoverflow.com/questions/42367105
复制相似问题