Blog by Frank

Smart Speaker based on GPT by OpenAI

GitHub Link: GitHub Video Link: Twitter

GPT-Screenshot

Table Of Content

Characteristics

Example Questions

$ Suggest three names for an animal that is a superhero.
Animal: Cat
Names: Captain Sharpclaw, Agent Fluffball, The Incredible Feline
Animal: Dog
Names: Ruff the Protector, Wonder Canine, Sir Barks-a-Lot
Animal: Horse

Names: Super Stallion, Mighty Mare, The Magnificent Equine

Steps

Step 1. Install all dependencies client - npm install

Step 2. Train Wake word(Optional)

Step 3. change .env.example to .env and filling .env files

Step 4. Change TEST_MODE to True or IS_RASPBERRYPI in server/utils/config.py(Important), connect url in client/src/app.js(Optional)

Step 4. run sh start.sh or server - app.py and client - npm start

Installation

run install.sh or follow the steps

PyAudio

Installation error on macOS

# src/pyaudio/device_api.c:9:10: fatal error: 'portaudio.h' file not found
brew install portaudio
pip3 install pyAudio

# Linux
sudo apt install python3-pyaudio

# https://stackoverflow.com/questions/58974116/how-to-install-libasound2-dev-32-bit-without-using-apt-get
sudo apt-get install libportaudio2

picovoice.ai

pip3 install pvporcupine
pip3 install pvcobra

Azure Speech Service

sudo apt-get update
sudo apt-get install build-essential libssl-dev libasound2 wget
pip install azure-cognitiveservices-speech

dotenv

cd ./code && mv .env.example .env
pip3 install python-dotenv
PICOVOICE_AI_KEY=${YOUR-PICOVOICE-AI-KEY}
SPEECH_KEY=${MICROSOFT-AZURE-SPEECH-KEY}
SPEECH_REGION=${MICROSOFT-AZURE-SPEECH-REGION}

Reference

Services

Articles