Text to Speech Package – our assistant will need to convert your voiced question to a text one.The SpeechRecognition package allows Python to access audio from your machine’s microphone, transcribe audio, save audio to an audio file, and other similar tasks. Speech Recognition Package – when you voice a question, we’ll need something that can capture it.In addition to the standard packages included in ActivePython, we’ll need to add a few third party packages, including something that can do speech recognition, convert text to speech and playback audio: Build your own custom Python runtime with just the packages you’ll need for this project, by creating a free ActiveState Platform account, after which you will see the following image:Ĭlick the Get Started button and choose Python 3.6 and the OS you’re working in.
Download and install the pre-built Virtual Assistant runtime environment (including Python 3.6) for Windows 10, macOS, CentOS 7, or….I’ll be using ActivePython, for which you have two choices:
To follow along with the code in this tutorial, you’ll need to have a recent version of Python installed. Fortunately, it’s relatively easy to build your own.ĭigital Virtual Assistant in Python – Step 1: Installing Python Despite the inherent “cool” factor that comes with using a digital assistant, you may find that the aforementioned digital assistants don’t cater to your specific needs. While each assistant may specialize in slightly different tasks, they all seek to make the user’s life easier through verbal interactions so you don’t have to search out a keyboard to find answers to questions like “What’s the weather today?” or “Where is Switzerland?”. The rise of automation, along with increased computational power, novel application of statistical algorithms, and improved accessibility to data, have resulted in the birth of the personal digital assistant market, popularly represented by Apple’s Siri, Microsoft’s Cortana, Google’s Google Assistant, and Amazon’s Alexa. From there, you can customize it to perform whatever tasks you need most. This tutorial will walk you through the basics of building your own digital virtual assistant in Python, complete with voice activation plus response to a few basic inquiries.