arx76 / GLaDOS-Voice-Assistant

DIY Voice Assistant based on the GLaDOS character from Portal video game series. Works with home assistant!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GLaDOS Voice Assistant

DIY Voice Assistant based on the GLaDOS character from Portal video game series.

  • Designed for Raspberry Pi
  • Written mostly in Python
  • Work in progress

Description

Main features

  1. Local Trigger word detection using PocketSphinx
  2. Speech to text processing using Google's API (for now)
  3. GLaDOS Text-to-Speech generation using https://glados.c-net.org/
  4. Storing of generated audio samples locally for instant answers in the future
  5. Animatronic eye control using servos
  6. Round LCD for an eye to display display textures

Tight integration with Home Assistant's local API:

  • Send commands to Home Assistant
  • Can read and speak sensor data
  • Notification API, so Home Assistant can speak notifications aloud

What it can do:

  • Clock
  • Control lights and devices
  • Weather and forecast
  • Add things to shopping list
  • Read sensor information
  • Random magic 8-ball answers
  • Tell jokes
  • Judge you and be mean
  • Advanced fat-shaming
  • Log stuff and gather training data locally

Note: The code is provided as reference only.

To use:

You can add glados.py to your crontab file or run it manually.

crontab -e
@reboot python3 /home/username/GLaDOS-Voice-Assistant/glados.py

Additionally you can configure the ReSpeaker at startup by adding following lines to root's crontab:

sudo su
crontab -e
@reboot bash /home/username/GLaDOS-Voice-Assistant/hardware/ReSpeaker/ReSpeaker_Startup_Config.sh
@reboot python3 /home/username/GLaDOS-Voice-Assistant/hardware/ReSpeaker/ReSpeaker_Turn_off_Pixelring.py

Hardware

List of reference hardware what nerdaxic is developing on, models might not need to be exact. Not a full bill of materials.

Item Description
Main board Raspberry Pi 4 Model B 8GB
Power supply for Digital + Audio Raspberry Pi 15W USB-C Power supply
Memory card Class 10 64 GB microSDXC U3
Microcontroller Teensy 4, to control the eye LCD and NeoPixels
Eye lights Adafruit NeoPixel Diffused 5mm Through-Hole for the "REC" light
Eye lights Adafruit 16 x 5050 NeoPixel Ring
Eye LCD 1.28 Inch TFT LCD Display Module Round, GC9A01 Driver SPI Interface 240 x 240

Audio

Audio amp is powered from Raspberry GPIO 5V line and ReSpeaker board from USB to avoid ground loops and noise issues.

Item Description
Audio amplifier Adafruit Stereo 3.7W Class D Audio Amplifier
Speakers Visaton FRS 7
Microphone & Audio interface ReSpeaker Mic Array V2.0

Mechanics

Mechanics are powered from their own power supply to allow more power for the servos and prevent brown-outs.

Item Description
Power supply MeanWell LRS-50-5 5V
Servo controller Pololu Micro Maestro
Servo: Eye movement 35 kg DS3235 (Control Angle 180)
Servo: Eyelids 25 kg DS3225 (Control Angle 180)
Screws Various M3 and M4 screws
Jumper wires 0.32 mm²/22 AWG assortment

About

DIY Voice Assistant based on the GLaDOS character from Portal video game series. Works with home assistant!


Languages

Language:C 89.8%Language:Python 8.2%Language:C++ 1.6%Language:Shell 0.4%