Code Monkey home page Code Monkey logo

googleassistant_respeakerd's Introduction

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

googleassistant_respeakerd's People

Contributors

killingjacky avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.