当SpeechRecognitionResult.Text返回“ ...”时,如何获取与Cortana交谈的文本。 -Windows UWP [英] How to fetch the text spoken to cortana while the SpeechRecognitionResult.Text is returning "..." - Windows UWP
问题描述
在将Windows UWP应用与Cortana进行深层链接时,我无法提取语音文字。在语音命令定义文件中,我正在将< ListenFor>
元素与{*}配合使用,以允许用户说任何话,但是我无法提取它
While deep linking Windows UWP apps with cortana, I'm unable to fetch the text spoken. In the Voice Command Definition file I'm using a <ListenFor>
element with {*} in order to allow user to speak anything, but I'm unable to fetch it.
推荐答案
如果您要设置VCD以接受自由格式的命令文字,则需要使用PhraseTopic领域。有关详细信息,请参见 1.2 VCD规范。
If you're trying to set up a VCD to accept freeform dictated text, you'll need to use a PhraseTopic field. See the 1.2 VCD spec for details.
例如,如果您有一个包含以下内容的命令块
For example, if you've got a Command block containing
<ListenFor> Take a note to {noteTopic} </ListenFor>
您需要相应的PhraseTopic
You'd want a corresponding PhraseTopic
<PhraseTopic Label="noteTopic" Scenario="Dictation">
</PhraseTopic>
您可以使用多种选项(主题和方案)来完善听写服务的行为。
There's various options (Subjects and Scenarios) you can use to refine the dictation service's behavior.
这篇关于当SpeechRecognitionResult.Text返回“ ...”时,如何获取与Cortana交谈的文本。 -Windows UWP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!