-
All replies
-
Helpful answers
-
Mar 30, 2016 3:36 PM in response to casouriby VikingOSX,This might be helpful.
Also, don't rule out the System Preferences : Accessibility : Dictation : Dictation Commands… where you have the ability to create a new voice command that performs the actions in a specified Automator Workflow.
One of my annoyances was that some applications export a PDF and then hide the extension. I created an Automator Workflow (restore_file_extension.workflow) that by selecting the file, and simply saying “Show Extension,” the workflow would tell Finder to display the selected filename extension. You can watch the extension abruptly appear. That Automator workflow file can be anywhere in your home folder. The perform selection (below) lets you walk to the file location and select it. Instead of an Automator Workflow, it can be just a compiled (.scpt/.scptd) AppleScript. You would press fn fn prior to this paragraph to have dictation listening.
The Automator Workflow is comprised of a sole Run AppleScript action:
-
Mar 30, 2016 6:10 PM in response to VikingOSXby casouri,Thank you. I find this "listen for" command in "Speech Recognition Suite". Can I start a dictation with it and get the sentence from it?
-
Mar 30, 2016 8:46 PM in response to casouriby Camelot,Can I start a dictation with it and get the sentence from it?
Yes. Use something like:
tell application "SpeechRecognitionServer"
set theResponse to listen for {"1", "2", "3", "4", "5"} with prompt "pick a number between 1 and 5"
say "You picked " & theResponse
end tell
Note that the phrase that SpeechRecognitionServer detected is returned in theResponse.
-
Mar 30, 2016 9:27 PM in response to Camelotby casouri,THanks! It's really helpful.
However, what is that prompt used for? Is it a window, a command that I say, or a dialog computer says?
-
Mar 30, 2016 10:09 PM in response to casouriby Camelot,Try it
The prompt is what the SpeechRecognitionServer uses to tell you it's listening, and what it's listening for.
If you don't want a prompt and instead want the server to listen continuously, use the listen continuously for command instead.
-
Mar 31, 2016 3:16 AM in response to casouriby VikingOSX,There was an example of using listen for in that link that I provided in my previous post.
-
-
Mar 31, 2016 5:29 AM in response to VikingOSXby casouri,I'm sorry but I can't find your previous post. Thank you though.
-
Mar 31, 2016 6:45 AM in response to casouriby VikingOSX,I posted two previous responses to you in this thread. The first one has the word “might” as a hyperlink to a whole article on what you want to do, and with examples.
-
Mar 31, 2016 3:43 PM in response to VikingOSXby casouri,I didn't see your response before I click "show more comments". My bad, first time come here to ask questions.
Thanks, that really helps, I've begin to write my program : )

