As of this writing, there’s no fancy GUI for what we’re about to do, and the installation is going to rely primarily on command lines. But once you’ve got it up and running, you can speak into your computer’s microphone as you would to your Android device to control Google Assistant.
Requirements
Python 3
First, you’ll need to install Python on your computer and then we need to add it to the path, follow me carefully. Download and launch the Python installer .exe, and have it do a custom install. On the second options screen, tick “Add Python to environment variables”.
Once Python is installed, open a command terminal and type “python” (without quotations). If all is well, the command prompt should display your current Python version. Now we need to configure the Google Assistant API. Now we need to configure a client that will access the Google Assistant API. Open a command terminal and type the following command:
This will begin installing the required dependencies for Python. When it’s done, enter this command next (change the path directory in the command). In the command prompt, you will be shown a URL to visit to authorize the application. Go ahead and copypaste the URL into your browser, and use the same Google account you used to configure the Google Assistant API. You’ll be shown an access token for your client – copypaste the access token into the command prompt where asked. Now we’ll test if the Google Assistant can properly access your microphone. Type into the command prompt: If it successfully plays some audio for you, you can begin communicating with the Google Assistant. Type into the command prompt: Wait for it to say “press Enter to send new request”, then press Enter on your keyboard to begin talking into your mic. When you’re done talking, the command prompt will display a transcription of what you said, and also playback Google Assistant’s response. Now, the above command prompt is a fairly ugly method of interacting with the Google Assistant API, but luckily there is an extension for Chrome browser called “AutoVoice” that simply requires you have the Google Assistant set up on your computer (which we just did!). However, we’ll need to do a little bit more command prompt magic to set it up properly. Open the command prompt and copypaste the following command: Now navigate to the AutoVoice extension page with Google Chrome browser and install it. In the extension options, configure the wake-up command to something like “Hey Google” or “Okay Google” or whatever you want really. Enable the “Always Listening” option and set the “Wake up Expression” to something other than what you set as the wake-up command. Remember – one expression is to wake up the extension, the other expression is to wake up Google Assistant. Now type into your command prompt: Now you can simply say “Hey Google!” or whatever you set as your expression to wake up Google Assistant, and immediately begin giving it commands (“Hey Google, what’s the weather today?”)
Google Assistant vs Siri vs Alexa vs Cortana: Which is the best smart assistant?Google Rolls Out New Google Assistant “Snapshot”: A Revamped Version of Google…Google Pixel 3 Pixel Launcher Update Makes Minor Changes to Assistant ButtonHow to Fully Automate your Home using Google Assistant?