Skip to main content

Google Assistant Library Python wrapper

Project description

High level Python bindings for the Google Assistant Library.

It supports the following features: - recording of audio query. - playback of assistant answer. - “Ok Google” and “Hey Google” hotword detection.

Prerequisites

  • Python (3.x prefered)

  • Google API Console Project w/ Google Assistant API enabled.

  • OAuth client ID credentials with application type Other.

  • Use a new virtualenv (recommended):

    # python3 (recommended)
    sudo apt-get update
    sudo apt-get install python3-dev python3-venv
    python3 -m venv env
    env/bin/python -m pip install --upgrade pip setuptools
    source env/bin/activate
    
    # python2
    sudo apt-get update
    sudo apt-get install python-dev python-virtualenv
    virtualenv env --no-site-packages
    env/bin/python -m pip install --upgrade pip setuptools
    source env/bin/activate

Install

  • Install the package and its dependencies:

    python -m pip install --upgrade google-assistant-library

Run the demo

  • Authenticate (this step only needs to be run once):

    python -m pip install google-auth-oauthlib[tool]
    google-oauthlib-tool --client-secrets path/to/client_secret_XXXXX.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save
  • Run the demo:

    google-assistant-demo
  • Say “Ok Google”, followed by a voice query: the demo should playback the assistant answer and log events to the screen.

For Maintainers

See MAINTAINER.md for more documentation on the development, maintainance and release of the Python package itself.

License

See LICENSE and google/assistant/library/LICENSE.third_party.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

google_assistant_library-0.0.3-py2.py3-none-linux_armv7l.whl (6.5 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page