Hi, i am learning the basics for applescript but need help with something. I pretty much am in the middle of programming a basic AI on my computer, but i need help with something -
I know how to make it say something (say “good morning”) and other stuff.
What I NEED to know, is how to make it recognize commands I say, and have it say stuff back. Not like, “open safai, or check mail”, NO. Those are the only tutorials I can even find for apple script. I want it to say a pre-typed message when it detects that I said something, so a very basic conversation bot. Please help.
What you’re most likely looking for is the listen for command, which lives in the app “SpeechRecognitionServer”. Or, since you’re talking about an AI, I suppose you’ll want it to be running in the background, in which case you should use listen continuously for.
I learned the basics from existing tutorials on these commands, and my blog post is sort of a summary on those.
Thanks a million, it looks like is will help. I haven’t been able to find any tutorials that have worked, but I think this it exactly what I need, thanks!
Okayyy, sorry that I’ve already thanked you so much, but when i put the, listen for {“yes”,“no”} with prompt "Do you want to play a game?"¨
and try to compile it, i get a syntax error that states, Expected “given”, “into”, “with”, “without”, other parameter name, etc. but found “”".
and it highlights the " right before the Do you want to…These are the sort of problems I’ve got while trying other people’s methods. Please help.
It might have to do with “fancy” rich text formatted quotation marks. When you copy scripts from a website and they won’t compile, it might be because you’ve introduced symbols that AppleScript doesn’t understand. Many websites use rich text formatted symbols unless the source text is wrapped in tags, and sometimes those small differences are hard to spot.