如何在Google Cloud Speech-to-Text API中禁用句子级自动更正 [英] How to disable sentence-level auto correction in Google Cloud Speech-to-Text API

查看:83
本文介绍了如何在Google Cloud Speech-to-Text API中禁用句子级自动更正的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在执行语音识别任务,该任务涉及检测儿童的语音能力,随着时间的推移而改善 ...

I am working on a speech recognition task, which involves the detection of children's speaking capability, improvement over time...

我想将Google Cloud Speech to Text API用于检测的ASR部分.然后,我将使用不同测量结果的成绩单来估算进度.

I'd like to use the Google Cloud Speech to Text API for the ASR part of the detection. Then I would use the transcripts of different measurements to estimate the advancement.

但是! Google Speech API的句子级别自动更正功能始终会重写口语的前一段...

But! The sentence level autocorrect of Google Speech API consistently rewrites the previous limb of the spoken sentence...

是否可以禁用此ASR的自动更正?

我无法使用"speechContext","single_utterance"或"maxAlternatives"选项来绕过此问题.

I can't bypass this problem with the "speechContext", "single_utterance" or "maxAlternatives" options.

"single_utterance"可能适用于单词,但是可以纠正拼写错误..

"single_utterance" may work with words, but it corrects the misspells..

该领域有什么建议吗?

推荐答案

如果您使用流式传输而不是批量识别,则应在转录该部分音频后立即收到答案,它不会等待其余的这句话.然后,您应该只存储流提供的第一个答案,而不是进一步的更正.

If you use streaming instead of batch recognize, you should receive an answer as soon as that part of the audio is transcribed, it does not wait for the rest of the sentence. You should then just store the first answer provided by the stream, not the further corrections.

这意味着您不必必须等到isFinal=True.

有关我的意思的简单示例,请转到语音API页面,然后在开发人员工具打开的情况下运行流测试.在这里,您会看到说出单词时收到的流数据:

For a quick and dirty example of what I mean, go tho the speech API page, and run the streaming test with the developer tools open. There you'll see the streaming data received as the words are being spoken:

这篇关于如何在Google Cloud Speech-to-Text API中禁用句子级自动更正的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆