Google cloud platform Google语音API文件大小失败>;1 mb
我在node.js应用程序中使用谷歌云语音API。这是托管在谷歌计算引擎。我使用谷歌存储作为语音到文本的输入源。每当我使用的音频文件Google cloud platform Google语音API文件大小失败>;1 mb,google-cloud-platform,google-cloud-speech,Google Cloud Platform,Google Cloud Speech,我在node.js应用程序中使用谷歌云语音API。这是托管在谷歌计算引擎。我使用谷歌存储作为语音到文本的输入源。每当我使用的音频文件 speechClient.startRecognition('gs://bucket-name/filename.flac', { encoding: 'FLAC', sampleRate: 16000 }, function(err, operation, apiResponse){ if(err){ console.lo
speechClient.startRecognition('gs://bucket-name/filename.flac', {
encoding: 'FLAC',
sampleRate: 16000
}, function(err, operation, apiResponse){
if(err){
console.log('FIRST FAILURE');
console.log({
error: err,
response: apiResponse
});
callback({
error: err,
response: apiResponse
}, null);
}
else{
operation
.on('error', function(err) {
callback({
error: err
}, null);
})
.on('complete', function(transcript) {
callback(null, transcript);
});
}
})
FIRST FAILURE
{"error":{"code":400,"metadata":{"_internal_repr":{}}},"response":null}