PiSugar/whisplay-ai-chatbot
About
Pocket-sized AI chatbot built using a RPI Zero 2w / 5
AI & Machine LearningMeasured star growth
- in 24h
- +1
- in 7 days
- +1
- in 15 days
- +4
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalWhisplay-AI-Chatbot
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):
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.
- Whisplay HAT (SPI LCD) requires the Whisplay HAT driver.
- Whisplay HAT+ (MIPI DSI touchscreen) requires 64-bit Raspberry Pi OS Desktop and the Whisplay Plus driver.
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.
Clone the repository:
git clone https://github.com/PiSugar/whisplay-ai-chatbot.git cd whisplay-ai-chatbotInstall dependencies:
bash install_dependencies.sh source ~/.bashrcThe installer uses Node.js 22 or later and installs Node.js 22 if needed. On an existing installation,
whisplay updatealso upgrades Node.js before installing dependencies and building. Reload the shell configuration withsource ~/.bashrc.Custom npm registry: All scripts respect the
NPM_REGISTRYenvironment 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.shThis also applies to
build.shand allwhisplayCLI commands (plugin install,plugin update,update, etc.).Configure environment variables:
whisplay configureThis command opens an interactive config wizard. If
.envdoes not exist yet, it will be created automatically from.env.template. You can still use the manual method if you prefer:cp .env.template .envBuild the project:
bash build.shStart the chatbot service:
bash run_chatbot.shOptionally, set up the chatbot service to start on boot:
bash startup.shIf
whisplay-daemonis 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 standalonechatbot.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 atchatbot.log. Runningtail -f chatbot.logwill 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
wtypefor labwc/Wayland (sudo apt install wtype) orxdotoolfor 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
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
Explore related projects
Loading…