Samples and Tools the Google Assistant SDK
Project description
This package contains a collection of samples and tools to help you get started with the Google Assistant SDK using Python.
Installing
You can install using pip:
pip install --upgrade google-assistant-sdk
Usage
google-oauthlib-tool
This tool creates test credentials to authorize devices to call the Google Assistant API when prototyping.
Follow the steps to configure a Google API Console Project and a Google account to use with the Google Assistant SDK.
Download the client_secret_XXXXX.json file from the Google API Console Project credentials section and generate credentials:
pip install --upgrade 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 --headless
googlesamples-assistant-audiotest
This tool verifies device setup for audio recording and playback.
Install the sample’s dependencies:
sudo apt-get install portaudio19-dev libffi-dev libssl-dev pip install --upgrade google-assistant-sdk[samples]
Record 10 seconds of audio samples and play them back:
googlesamples-assistant-audiotest --record-time 10
Adjust the sound device block size and flush size for a soundcard with limited throughput:
googlesamples-assistant-audiotest --record-time 10 --audio-block-size=3200 --audio-flush-size=6400
The same --audio-block-size and --audio-flush-size options can be used on the gRPC samples included in the SDK.
googlesamples-assistant-pushtotalk
This reference sample implements a simple but functional client for the Google Assistant gRPC API.
Install the sample’s dependencies:
sudo apt-get install portaudio19-dev libffi-dev libssl-dev pip install --upgrade google-assistant-sdk[samples]
Try the push to talk sample:
googlesamples-assistant-pushtotalk
googlesamples-assistant-hotword
This reference sample implements a simple but functional client for the Google Assistant library.
Download the latest linux_arm7l wheel for the google_assistant_library from the GitHub releases page.
Install the google_assistant_library wheel and the samples dependencies using pip:
pip install --upgrade google_assistant_library-0.0.2-py2.py3-none-linux_armv7l.whl pip install --upgrade google-assistant-sdk[samples]
Try the hotword sample:
googlesamples-assistant-hotword
For Maintainers
See MAINTAINER.md for more documentation on the development, maintainance and release of the Python package itself.
Contributing
Contributions to this repository are always welcome and highly encouraged.
See CONTRIBUTING.md for more information on how to get started.
License
Copyright (C) 2017 Google Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for google-assistant-sdk-0.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84a0b7a608bb2ffcc366b0e460ef17643bce5b89277b666ed52fe1c16cd0448e |
|
MD5 | 9436d59fb70744650aae64a3e379a5fe |
|
BLAKE2b-256 | 2dd8b0f6af960554d459ea4f231ce38f633a90a9ad755b895e962f9b535b2ef7 |
Hashes for google_assistant_sdk-0.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a9ac22004fa0b096bdcb9b5b6c7df1c6b54104a865a0e324033a902fdbbe456 |
|
MD5 | f827a503a044a309d48ec0db9dff14ef |
|
BLAKE2b-256 | 0cec1fa6cfd776178fcd4a71d83bc3ac42f6385c1220b1d0a8d15196fa45e786 |