我正在执行对Google Cloud Speech API的异步请求,但我不知道如何获取操作结果:
要求POST: https ://speech.googleapis.com/v1beta1/speech:asyncrecognize
身体:
{
"config":{
"languageCode" : "pt-BR",
"encoding" : "LINEAR16",
"sampleRate" : 16000
},
"audio":{
"uri":"gs://bucket/audio.flac"
}
}
哪个返回:
{ "name": "469432517" }
因此,我进行了POST:https : //speech.googleapis.com/v1beta1/operations/469432517
哪个返回:
{
"name": "469432517",
"metadata": {
"@type": "type.googleapis.com/google.cloud.speech.v1beta1.AsyncRecognizeMetadata",
"progressPercent": 100,
"startTime": "2016-08-11T21:18:29.985053Z",
"lastUpdateTime": "2016-08-11T21:18:31.888412Z"
},
"done": true,
"response": {
"@type": "type.googleapis.com/google.cloud.speech.v1beta1.AsyncRecognizeResponse"
}
}
我需要得到操作的结果:转录的文本。
我怎样才能做到这一点?
qq_花开花谢_0