How can I do voice recognition on Mac OS X from the command line? Details:
% When I look in ~/Library/Speech/Speakable Items, I see many files, like "Tell me a joke", whose contents are:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>BuiltInCommandID</key>
<integer>105</integer>
<key>semanticCategory</key>
<string>globalTellMeAJoke</string>
<key>alternativeSpokenFeedback</key>
<string></string>
<key>suppressSpokenConfirmation</key>
<string>yes</string>
<key>alternativeFeedback</key>
<string></string>
<key>DefaultCommandName</key>
<string>Tell me a joke</string>
</dict>
</plist>
% How does OS X know when to invoke this file? When I say something, does it look for a matching filename?
% How does OS X know what command to run? I see nothing in that file that says what command to run ("Tell me a joke" is not a command-line command).
% I know there's some osacompile magic going on, but can't figure out what it is.
% How can I get OS X to listen for the string "s" and run the program "cmd" in response? I'd prefer to do this purely from the command-line, but if I have to open up a graphical program, I will.
