本文介绍了如何让applescript语音识别听任何单词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能让applescript 语音识别听任何单词?这是我目前所拥有的:

How can I make applescript voice recognition listen for any word? This is what I have so far:

tell application "System Events"
    keystroke "c" using {command down}
end tell

tell application "iCal" to activate

tell application "System Events"
        keystroke "n" using {command down}
    keystroke "v" using {command down}
    keystroke return
end tell

我想替换第一行的副本来听任何单词.

I would like to substitute the copy on the first line to listen for any words.

推荐答案

tell application "SpeechRecognitionServer"
    set answer to listen for {"yes", "no"} with prompt "prompt"
    --hold the listening key (by default escape) to record an answer
end tell

必须先启用可朗读项目:

Speakable items have to be enabled first:

参见 http://macscripter.net/viewtopic.php?id=24662 了解更详细的说明.

See http://macscripter.net/viewtopic.php?id=24662 for more detailed instructions.

这篇关于如何让applescript语音识别听任何单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 07:23