Skip to content
プロジェクト

PiSugar/whisplay-ai-chatbot

GitHubで見る

概要

RPI Zero 2w / 5 で構築された手のひらサイズの AI チャットボット

AI・機械学習

この数値の測り方

計測したスター増加

24時間
+1
7日間
+1
15日間
+4
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

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 (SPI LCD) or Whisplay HAT+ (MIPI DSI touchscreen), with on-board speaker and microphone
  • PiSugar 3 1200mAh (Plus version 5000mAh for RPi 5)

Pre-build Image

GitHub Actions builds four images for each version tag. Choose the image that matches your HAT and whether you want bundled offline models. Release assets

HAT Basic Pi 5 Offline
Whisplay HAT (SPI LCD) whisplay-basic.img.xz · Setup whisplay-pi5-offline.img.gz · Setup
Whisplay HAT+ (MIPI DSI touchscreen) whisplay-basic-plus.img.xz · Setup whisplay-pi5-offline-plus.img.gz · Setup

The Pi 5 Offline images require a Raspberry Pi 5 and bundle models for local speech recognition, chat, and speech synthesis.

If the release lists numbered parts for your image, download every part and verify and join them before flashing. Split image download guide

Drivers

If you are setting up the chatbot on your own Raspberry Pi OS installation, install the driver for your board first.

Installation Steps

On a Luckfox Lyra Zero W running Buildroot, run bash install_dependencies.sh as root from the chatbot checkout. The installer downloads and verifies the ARMv7 bundle from GitHub Releases. Use whisplay update [bundle.tar.gz] for subsequent updates. See Luckfox installation and updates. For Raspberry Pi, follow the steps below.

  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
    

    The installer uses Node.js 22 or later and installs Node.js 22 if needed. On an existing installation, whisplay update also upgrades Node.js before installing dependencies and building. Reload the shell configuration with source ~/.bashrc.

    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. Configure environment variables:

    whisplay configure
    

    This command opens an interactive config wizard. If .env does not exist yet, it will be created automatically from .env.template. You can still use the manual method if you prefer:

    cp .env.template .env
    
  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
    

    If whisplay-daemon is running, this registers the chatbot with the daemon, configures it as the daemon's boot autostart app, and launches it immediately. Otherwise, the script installs the legacy standalone chatbot.service. Keep the graphical desktop enabled for the Whisplay HAT+ touchscreen UI. For a headless setup, the script may offer to switch to multi-user mode. You can find the output logs at chatbot.log. Running tail -f chatbot.log will also display the logs in real-time.

Whisplay Plus Quick Start

The Whisplay HAT+ image sets the model in .env and includes a Whisplay AI Chatbot desktop launcher. On a manual installation, the chatbot detects HAT+ from its DSI display. You can also set the model explicitly in .env:

WHISPLAY_HAT_MODEL=hat-plus

Start the app with bash run_chatbot.sh. The fullscreen touchscreen UI opens automatically and is also available at http://<raspberry-pi-ip>:17881/ by default.

  • Press and hold either the physical button or the on-screen microphone button to speak, then release it to send the recording.
  • A physical button press or a detected wake word wakes the display during desktop screen blanking. On an existing or manual installation, install wtype for labwc/Wayland (sudo apt install wtype) or xdotool for X11 (sudo apt install xdotool).
  • Use the three-dot settings button to adjust volume and brightness or exit the app. Whisplay Plus keeps the current speaker volume when the app starts.
  • If ENABLE_CAMERA=true, use the camera button beside Settings to open the preview. Tap the preview to focus, then use the physical button or the on-screen shutter button to take a photo.
  • GPIO17 must be available for the physical button. Stop or reconfigure any other hardware service that owns GPIO17.

The default screen orientation is portrait. Run the orientation script as the desktop user (without sudo) to switch the display and touchscreen mapping together:

# Portrait (default)
bash scripts/set-hat-plus-orientation.sh portrait

# Landscape
bash scripts/set-hat-plus-orientation.sh landscape

# Show the current configuration
bash scripts/set-hat-plus-orientation.sh status

To add a launcher to the Raspberry Pi desktop:

bash scripts/install-hat-plus-desktop-shortcut.sh

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

The recommended way to update environment variables is:

whisplay configure

This lets you manage .env by category and will create the file automatically if it is missing.

You can also edit .env directly if you prefer. 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.

Auto Listening

Set AUTO_LISTENING_ENABLED=true in .env, or use AI Features → Auto Listening in whisplay configure, then restart the chatbot. On Whisplay Plus, change Settings → Auto Listening to apply and save the setting immediately. A single press starts automatic listening and speech ends after a pause. Press again while listening to cancel, or press during recognition or playback to start listening again. The button and wake word share the automatic recording and conversation timeouts. Under AI Features → Auto Listening, set AUTO_LISTENING_END_KEYWORDS to a comma-separated list of phrases that return a button-started session to standby after recognition, regardless of letter case. The defaults are byebye,goodbye,bye for now,stop,all done,end conversation. Wake-word sessions use WAKE_WORD_END_KEYWORDS. With Auto Listening enabled, use the on-screen camera control on supported displays.

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

Whisplay Plus Chatbot Case (FDM) for Pi5

AI Accelerator Card Support

EASY EAI EAI182X-M2 offline chat, vision, ASR, and TTS

LLM8850

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

Goals

Delivered

  • Provide ready-to-flash Basic and Pi 5 Offline images for both Whisplay HAT and HAT+. Image setup
  • Support wake-word activation and automatic listening. Auto Listening
  • Support Whisplay Plus touchscreen controls, camera capture, and switching between in-memory conversations. Quick start
  • Run Whisper ASR, MeloTTS, Qwen3 text inference, Qwen3-VL vision inference, and image generation on LLM8850. LLM8850 integration
  • Run Whisper ASR, local chat, and vision on Raspberry Pi AI HAT+ 2 (Hailo-10H). AI HAT+ 2 setup
  • Run offline chat, vision, ASR, and TTS on EASY EAI EAI182X-M2. EAI182X-M2 setup

Planned

  • Add speaker recognition.

Star History

License

GPL-3.0

関連プロジェクトを探す

読み込み中…