[英]Using the node.js google cloud speech to text, how can I get the status of a current job?
I managed to trigger a job with: 我设法触发了一项工作:
const config = {
languageCode: 'en-US',
enableSpeakerDiarization: true,
audioChannelCount: 2,
enableSeparateRecognitionPerChannel: true,
useEnhanced: true,
profanityFilter: false,
enableAutomaticPunctuation: true,
};
const audio = {
uri: `gs://${filePath}`
}
const requestObj = {
config: config,
audio: audio
}
return speechClient.longRunningRecognize(requestObj)
I get back an object with a name
. 我取回一个带有
name
的对象。 I want to use that with https://cloud.google.com/speech-to-text/docs/reference/rest/v1/LongRunningRecognizeMetadata (via the node.js package) to get the current status. 我想将其与https://cloud.google.com/speech-to-text/docs/reference/rest/v1/LongRunningRecognizeMetadata一起使用(通过node.js包)以获取当前状态。
How do I do it? 我该怎么做?
return speechClient.longrunning.Operation()
Seems not to exist 似乎不存在
Looks like you can do it with: 看来您可以使用:
return speechClient.operationsClient.getOperation({ name: googleName })
This is not super well documented 这没有很好的记录
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.