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

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file google_assistant_library-0.0.3-py2.py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for google_assistant_library-0.0.3-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5e4c5a46145b92ed5ac2b801821dc37fe6fc5a5a679763b245f14d33f49f59da
MD5 a0118e28aa13b1ccbc0d570994b67d6d
BLAKE2b-256 8c221ff4c7e9be8491029b2cff8e7cf2db54d213cbb100e557acd4e762ce93a2

See more details on using hashes here.

File details

Details for the file google_assistant_library-0.0.3-py2.py3-none-linux_armv7l.whl.

File metadata

File hashes

Hashes for google_assistant_library-0.0.3-py2.py3-none-linux_armv7l.whl
Algorithm Hash digest
SHA256 be119cc2af08e82ee05ddf5a3bc14dcf26929c7af327812c0d6fc593d3f5f764
MD5 5f29a925dd3fa2ae440b1d42dfc7fe5f
BLAKE2b-256 2f70a853e4f762e5425bf688f49622380d1d06bf5d4b2279bc6b88bb700fd504

See more details on using hashes here.

Supported by

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