
pip install SpeechRecognition pip install pyaudio pip install elasticsearch Speech Recognition in Python We’ll also use the elasticsearch Python client to make things easier for us, I’m working in Python 3. The speech_recognition package we’ll use to translate speech to text, and pyaudio is necessary for connecting to your computer’s microphone. I’ll be using pip for python package management. Then in a terminal run: brew install portaudio brew install elasticsearch Homebrew is a great package manager for macOS and can be downloaded here. On Mac, install portaudio and elasticsearch with homebrew. The second is the same as my past post, and uses elasticsearch to do query-query matching and return a response. The first one is to get access to the microphone - credit to this post for a great intro to speech recognition in python. I’ll show two different voice activated capabilities in this blog post: There’s some other posts out there with pretty much the same general concept - but didn’t see anything much like this on TDS and figured what the hell 🤷🏻 I can write better than that and mine will be more fun. This blog post should, however, give you a great place to start if you’ve ever wondered how to create your own voice assistant in python and love to screw around. Honestly, it took me longer to find/make the gifs for this post than it did to code it out. Like my last blog post on creating a chatbot using your own text messages, this isn’t going to be a fully developed idea and won’t get you too far in a production.

Ironic Cortana Reference Since We’re on Mac - Source
