#robotic

Google's Voice Kit

Craziest yet smallest tech DIY ever, this is the Google Voice Kit

Presentation

The amount of available projects with just this tiny box is mind-blowing. It comes with a set of very detailed and understandable test programs to show you how easy it is to use this kit.

A press of a button and you’re good to go. Too lazy to rise your arm ? A simple “OK Google” can be caught thanks to two microphones hidden in the box. Wait a second, and the answer will be read aloud to you. These are the default features provided with Google’s Configuration Guide.

Sounds cool? Hold on tight, there are more coming. Because a Google product comes with Google’s APIs (and obviously all other available APIs), you can turn this kit into anything you want. And thanks to the Raspberry Pi’s motherboard, you can add all the compatible tech and unleash the power of your kit.

No special coding skills are required, as most programs are in Python. And I assume that you can use any other language you want (well, most of them).

How is it made ?

Well, fairly easily. The assembly is very simple and you just need to download the latest system image. Everything is explained on the Google Voice Kit’s page : https://aiyprojects.withgoogle.com/voice/.

System image is available here : https://github.com/google/aiyprojects-raspbian/releases.

screenShot

screenShot

With a simple Raspberry Pi, Google’s APIs and all of your imagination, this device is completely yours.

Still not convinced? Check out the Google Visio Kit here : https://aiyprojects.withgoogle.com/vision/

Disclaimer and drawbacks

Please, be warned :

  • With the Google Assistant Library, hotword detection (« OK Google » or the phrase you customized) won’t work with Raspberry Zero. You will need Pi 2, Pi 3 or use the button (via grpc/gpio) to activate phrase recognition.
  • You will need a Google Cloup Platform account to use the Google speech API. But it’s free for limited personal use. You may be charged otherwise use.

Code sample

It’s very straightforward (from the AIY repository):

from aiy.board import Board, Led
from aiy.cloudspeech import CloudSpeechClient

hints = ('turn on the light', 'turn off the light', 'blink the light', 'goodbye')
client = CloudSpeechClient()
board = Board()

while True:
    logging.info('Say something.')
    text = client.recognize(language_code='en_US', hint_phrases=hints)
    if text is None:
        logging.info('Nothing recognized')
        continue

    logging.info('You said: "%s"' % text)
    text = text.lower()
    if 'turn on the light' in text:
        board.led.state = Led.ON
    elif 'turn off the light' in text:
        board.led.state = Led.OFF
    elif 'blink the light' in text:
        board.led.state = Led.BLINK
    elif 'goodbye' in text:
        break

Note: The Speech Api supports French and many languages!