I’m working on a voice-based artificial intelligence (like Jarvis from the Iron Man movies). One of the things I want it to do is listen to me say "search something123"
and recognize the word ‘search’ as a command. After hearing this command it should to launch google chrome and search for the rest of the phrase (‘something123’ in this case).
Does anyone know how I can make my script recognize the phrase “search” as a command? I’m coding in applescript and using the MAC speech recognition.
3
Answers
My script which uses Google’s voice search feature should get you started…
It looks like you need to specify what it is you’re looking for the user to say, so for a question like “What do you want to search for?” you would need to tell SpeechRecognitionServer what you want the input to be (In a list of strings). I threw together some sample code so you could see how it works, but I’m pretty sure this is the closest you can get to what you’re trying to do. If you’re going to be using SpeechRecognitionServer though, I strongly recommend looking at the library.
Well I have been trying to do the same as you. (sorry I’m a tad-bit late at answering) What I found is that you can use “Ok Google” if you have that installed if not, here is a script that should work. Keep in mind it’s not perfect but much simpler than what i’ve found.