我已经安装了 Dragon Naturally speak 14、dragonfly、最新的 natlink(4.1 或其他)、pywin32、python 2.7 和 wxpython
我在 natlink 设置的“用户配置目录”中有一个包含此文件的 python 文件
当 Dragon Naturally speak 开始时,我收到 natlink 弹出消息,告诉我它正在工作。我重置了 DNS 14 以确保我的“宏”(dosomething.py)已加载。
这是我的 dosomething.py 中的代码
from dragonfly import Grammar, CompoundRule
# Voice command rule combining spoken form and recognition processing.
class ExampleRule(CompoundRule):
spec = "do something computer" # Spoken form of command.
def _process_recognition(self, node, extras): # Callback when command is spoken.
print "Voice command spoken."
# Create a grammar which contains and loads the command rule.
grammar = Grammar("example grammar") # Create a grammar to contain the command rule.
grammar.add_rule(ExampleRule()) # Add the command rule to the grammar.
grammar.load() # Load the grammar.
while True:
pythoncom.PumpWaitingMessages()
sleep(.1)
但是,当我启动并激活 DNS 并使用听写和命令模式或只是命令模式说“做某事计算机”时,会弹出转录框,我如何判断它是否正常工作?我不认为它是。应该发生什么?我是 python 新手,我在 cmd 窗口中启动了解释器,没有像“语音命令”这样的提示。当我说语音命令时会生成。这是应该发生的事情吗?