Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform Google语音API文件大小失败>;1 mb_Google Cloud Platform_Google Cloud Speech - Fatal编程技术网

Google cloud platform Google语音API文件大小失败>;1 mb

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

我在node.js应用程序中使用谷歌云语音API。这是托管在谷歌计算引擎。我使用谷歌存储作为语音到文本的输入源。每当我使用的音频文件
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}