Skip to content

PiSugar/whisplay-ai-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

877 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whisplay-AI-Chatbot

Whisplay AI Chatbot

Discord

This is a pocket-sized AI chatbot device built using a Raspberry Pi Zero 2w / 5. Just press the button, speak, and it talks back—like a futuristic walkie-talkie with a mind of its own.

Test Video Playlist: https://www.youtube.com/watch?v=lOVA0Gui-4Q

Tutorial: https://www.youtube.com/watch?v=Nwu2DruSuyI

Tutorial (offline version build on RPi 5):

https://youtu.be/kFmhSTh167U

https://youtu.be/QNbHdJUW6z8

https://youtu.be/xGzvFzdBAwc

Hardware

  • Raspberry Pi zero 2w (Recommand RRi 5, 8G RAM for offline build)
  • PiSugar Whisplay HAT (including LCD screen, on-board speaker and microphone)
  • PiSugar 3 1200mAh (Plus version 5000mAh for RPi 5)

Pre-build Image

Drivers

You need to firstly install the audio drivers for the Whisplay HAT. Follow the instructions in the Whisplay HAT repository.

Installation Steps

  1. Clone the repository:

    git clone https://github.com/PiSugar/whisplay-ai-chatbot.git
    cd whisplay-ai-chatbot
  2. Install dependencies:

    bash install_dependencies.sh
    source ~/.bashrc

    Running source ~/.bashrc is necessary to load the new environment variables.

    Custom npm registry: All scripts respect the NPM_REGISTRY environment variable. If not set, the official npm registry (https://registry.npmjs.org) is used. To use a mirror (e.g. in China), export it before running any script:

    export NPM_REGISTRY="https://registry.npmmirror.com"
    bash install_dependencies.sh

    This also applies to build.sh and all whisplay CLI commands (plugin install, plugin update, update, etc.).

  3. Create a .env file based on the .env.template file and fill in the necessary environment variables.

  4. Build the project:

    bash build.sh
  5. Start the chatbot service:

    bash run_chatbot.sh
  6. Optionally, set up the chatbot service to start on boot:

    bash startup.sh

    Please note that this will disable the graphical interface and set the system to multi-user mode, which is suitable for headless operation. You can find the output logs at chatbot.log. Running tail -f chatbot.log will also display the logs in real-time.

Build After Code Changes

If you make changes to the node code or just pull the new code from this repository, you need to rebuild the project. You can do this by running:

bash build.sh

If If you encounter ModuleNotFoundError or there's new third-party libraries to the python code, please run the following command to update the dependencies for python:

cd python
pip install -r requirements.txt --break-system-packages

The env template may be updated from time to time. If you want to upgrade your existing .env file based on the latest .env.template, you can run the following command:

bash upgrade-env.sh

Update Environment Variables

If you need to update the environment variables, you can edit the .env file directly. After making changes, please restart the chatbot service with:

sudo systemctl restart chatbot.service

More Features

Wake Word for hands-free interaction.

Image Generation for generating images from text prompts.

Battery Level Display for installation instructions.

Data Folder for details on sub-folder layout and cleanup options.

Enclosure

Whisplay Chatbot Case for Pi02

Whisplay Chatbot Case (FDM) for Pi02

Whisplay Chatbot Case (FDM) for Pi5

Whisplay Chatbot Case (FDM) for Pi5 & LLM8850

AI Accelerator Card Support

LLM8850

Raspberry Pi AI HAT+ 2 (Hailo-10H)

Goals

  • Support LLM8850 whisper ✅
  • Support LLM8850 melottsTTS ✅
  • Support LLM8850 Qwen3 llm api (not support tool) ✅
  • Support LLM8850 Qwen3-VL multimodal llm api (not support tool) ✅
  • Support LLM8850 image generation ✅
  • Suppprt Raspberry Pi AI Hat+2 (Hailo-10H) whisper, llm, vlm ✅
  • Support speaker recognition

Star History

Star History Chart

License

GPL-3.0

About

Pocket-sized AI chatbot built using a RPI Zero 2w / 5

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors