Adapt google assistant's gRPC sample app for working with respeakerd
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
googleassistant_respeakerd the 1st version Mar 30, 2018
tests the 1st version Mar 30, 2018
.gitignore the 1st version Mar 30, 2018
.travis.yml remove python2.6 Mar 30, 2018
LICENSE the 1st version Mar 30, 2018
README.md the 1st version Mar 30, 2018
requirements.txt the 1st version Mar 30, 2018
setup.cfg Bump version: 0.1.1 → 0.1.2 Mar 30, 2018
setup.py Bump version: 0.1.1 → 0.1.2 Mar 30, 2018

README.md

Google Assistant to work with respeakerd

Build Status Pypi

Adapt google assistant's gRPC sample app for working with respeakerd.

About Google Assisant Service

Please refer to Google Assistant's documentations.

Setup Guide

Configure a Developer Project and Account Settings

Please refer to here.

Register the Device Model

Please refer to here.

Install the SDK and Sample Code

In this step, it's a little bit different from the Google's guide. Since we will use the pydbus library, which depends on the gi.repository library, it's not easy to install gi.repository in a python virtual env. But the system of ReSpeaker has this library builtin. So here we're going to skip the python virutal env setup from the Google's guide.

sudo apt-get install portaudio19-dev libffi-dev libssl-dev
sudo pip install -U googleassistant_respeakerd
google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless --client-secrets /path/to/credentials.json

You should see a URL displayed in the terminal:

Please visit this URL to authorize this application: https://...

Copy the URL and paste it into a browser (this can be done on any machine). The page will ask you to sign in to your Google account. Sign into the Google account that created the developer project in the previous step.

After you approve the permission request from the API, a code will appear in your browser, such as "4/XXXX". Copy and paste this code into the terminal:

Enter the authorization code:

If authorization was successful, you will see a response similar to the following:

credentials saved: /path/to/.config/google-oauthlib-tool/credentials.json

If instead you see InvalidGrantError, then an invalid code was entered. Try again, taking care to copy and paste the entire code.

Run the Sample Code

Please refer to here, except that you should replace the googlesamples-assistant-pushtotalk command with googlesamples-assistant-respeakerd. That is,

googlesamples-assistant-respeakerd --project-id my-dev-project --device-model-id my-model

Known Limits

  • Can not be interrupted (waked) when the assistant's speaking something