Skip to content

Simple Google Assistant with hotword activation from Snowboy setup for my Pi Zero W.

Notifications You must be signed in to change notification settings

mervit/sigy

 
 

Repository files navigation

google-assistant-hotword-raspi

Simple Google Assistant with hotword activation from Snowboy setup for my Pi Zero W.

Note: The included snowboy is for Python 2.7 only. TODO: Make it compatible with Python 3.

Setup

  • Configure a Developer Project and Account Settings
  • Configure and Test the Audio
  • Setup virtual environment
    -   (Recommended) For Python 3:
    
        sudo apt-get update
        sudo apt-get install python3-dev python3-venv
        python3 -m venv env
        env/bin/python -m pip install pip setuptools --upgrade
        source env/bin/activate
    
    -   For Python 2:
    
        sudo apt-get update
        sudo apt-get install python-dev python-virtualenv
        virtualenv env --no-site-packages
        env/bin/pip install pip setuptools --upgrade
        source env/bin/activate
    
  • Install dependencies sudo apt-get install portaudio19-dev libffi-dev libssl-dev
  • Install Google Assistant SDK + Samples python -m pip install google-assistant-sdk[samples]
  • Get credentials python -m googlesamples.assistant.auth_helpers --client-secrets /home/pi/client_secret_XXXX.json
  • Test using the sample python -m googlesamples.assistant Issue commands after pressing enter and if you did all the steps above Google Assistant should respond.

PS On Raspberry Pi Zero W this setup takes about 30-40 minutes.

  • (Optional - The required files are already in this repo) Download Snowboy compiled library for all versions of Pi + demo
  • Install dependencies sudo apt-get install python-pyaudio python3-pyaudio sox
  • Install BLAS sudo apt-get install libatlas-base-dev
  • Install PyAudio pip install pyaudio You should be able to recored audio using: rec temp.wav

Train your own hotwords or download existing ones from https://snowboy.kitt.ai/

2. Run gassistant.py and you should have a working Google Assistant with hotword activation

`python gassistant.py models/ok_google.pmdl`

About

Simple Google Assistant with hotword activation from Snowboy setup for my Pi Zero W.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%