我正在用龙NaturallySpeaking写一个高级脚本的语音命令。我想访问识别历史记录的最后一个元素(例如,将其放入剪贴板,或重复)。为什么不能做到这一点?
例如,给定此识别历史记录:

我想要一个语音命令,这样当我说repeat时,龙NaturallySpeaking就会发送show recognition history键。
发布于 2017-03-14 21:49:41
好吧,我不知道这是不是你想要的,但无论命令名是什么,都将是最后的认可。你是说在那之前的认可吗?就是你在说命令之前说的那个?在这种情况下,尝试下面的方法,但要注意,这不像是再说一次这句话。它的字面意思是抄袭了Dragon听到你说的话(被识别)。因此,如果您在句子开头说"this is a test period“,让Dragon键入"This is a test.",那么您的新命令将键入"this is a test period”。
Sub Main
Dim engine As New DgnEngineControl
engine.DlgShow(dgndlgRecognitionHistory,0,,0) ' Call up Recognition History
Wait .5 ' Need a short delay
SendKeys "{Up}", True ' move up to prior utterance
SendKeys "{Tab}", True ' move to utterance selection
Wait .3
SendKeys "^c", True ' Copy to the clipboard
Wait .5 ' Need a short delay for clipboard
SendKeys "{Esc}", True ' Close recognition history
Wait .3
SendKeys "^v", True ' Paste from clipboard
End Sub要将识别转换为新识别的话语,需要进行一些额外的工作。
Hth
https://stackoverflow.com/questions/42774660
复制相似问题