Home/DIY Builds/Pocket AI Chatbot on Raspberry Pi Zero 2 W
Creator demonstratedLocalClaw source-reviewed

Build a Pocket AI Chatbot on Raspberry Pi Zero 2 W

A pocket-sized push-to-talk chatbot that captures speech, sends it to a configured cloud AI service and plays the spoken answer through the Whisplay HAT.

IntermediateComplete build · price variesCloud voice AI
Original demonstration by Jdaie Lin PiSugar built and documented the reference implementation.OpenAI API voice pipeline by OpenAI.
Pocket AI chatbot made from a Raspberry Pi Zero 2 W, Whisplay audio display HAT and slim battery board on a dark maker workbench
Original LocalClaw editorial artwork · not a creator thumbnail
ModelCloud model parametersNo local model weights
HardwareRaspberry Pi Zero 2 WWhisplay HAT · PiSugar 3 1200 mAh
PurposePocket cloud chatbotInternet and a funded API key required during use
Source statusReviewed 2026-09-01Creator demonstrated · not yet LocalClaw tested

Original demonstration

Watch Jdaie Lin build the pocket chatbot

The tutorial covers hardware assembly, Raspberry Pi OS, SSH, Whisplay drivers, chatbot configuration, volume adjustment, automatic startup and battery status in a compact Pi Zero 2 W stack.

Video: This Tiny Raspberry Pi Chatbot Actually Talks! 🤖 | Build an AI Chatbot with Whisplay HAT & PiSugar by Jdaie Lin. LocalClaw does not rehost or modify the video.

Cloud boundary

The Pi Zero runs the interface, not the AI model

This build sends audio and prompts to configured cloud services. Normal conversations require working Wi-Fi, a valid API key and available account credit; API usage can incur charges. It is not the offline Raspberry Pi 5 build listed separately in this directory.

Compute
Raspberry Pi Zero 2 W with a correctly soldered 40-pin GPIO header
Display and audio
PiSugar Whisplay HAT with LCD, microphones, speaker, button and RGB LEDs
Battery
PiSugar 3 1200 mAh, the documented Zero 2 W version
Storage
16 GB microSD minimum in the official image guide; 32 GB A2 recommended here
Operating system
Current 64-bit Raspberry Pi OS with SSH and Wi-Fi configured
Cloud access
Internet connection, OpenAI API key and sufficient API account credit for normal use
Privacy
Voice recordings and prompts leave the Raspberry Pi when cloud providers are selected

Verification boundary: LocalClaw checked the hardware and install path against the original video, the current PiSugar repository, Whisplay driver and official PiSugar documentation. The commands below pin the reviewed source revisions and keep credentials out of logs. Reviewed runtime commit: ee7301b2f769. LocalClaw has source-reviewed this guide but has not physically reproduced this build.

Parts list

Buy the exact pocket-size stack

These buttons open regional Amazon searches through LocalClaw. Confirm the exact specifications on the seller page before ordering.

01
Required

Raspberry Pi Zero 2 W with headers

Choose a Zero 2 W with the 40-pin header already soldered, or add a correctly soldered header before stacking the HAT. A full-size Pi 5 is not required for this cloud version.

Find on Amazon
02
Required

PiSugar Whisplay HAT

This board combines the portrait LCD, microphones, speaker, button and status LEDs used by the tutorial. Confirm the package includes its speaker and mounting hardware.

Find on Amazon
03
Required for portable use

PiSugar 3 1200 mAh battery

Use the compact 1200 mAh PiSugar 3 documented for the Zero 2 W build, not the larger PiSugar 3 Plus intended for Raspberry Pi 5.

Find on Amazon
04
Recommended

32 GB A2 microSD card

The official prebuilt path requires at least 16 GB. A reputable 32 GB A2 card leaves room for Raspberry Pi OS, dependencies, builds and logs.

Find on Amazon
05
Required for setup and charging

USB-C charging cable and 5 V adapter

Use a regulated adapter and a reliable cable while installing. Confirm the connector and charging instructions against the PiSugar 3 documentation before powering the assembled stack.

Find on Amazon

Affiliate disclosure: As an Amazon Associate, LocalClaw earns from qualifying purchases. The original creators do not endorse these purchasing links, and prices or availability may change.

Step-by-step

Assemble, configure and test the cloud chatbot

Use the original video as the visual assembly reference. This independent LocalClaw path follows the current official repository, adds credential protection and separates hardware, cloud and startup checks.

01

Flash Raspberry Pi OS and enable remote access

Use Raspberry Pi Imager to write current 64-bit Raspberry Pi OS. Set the hostname, username, password, Wi-Fi and SSH before the first boot.

  • Use a 16 GB or larger microSD card.
  • Record the hostname and login.
  • Keep Wi-Fi available because this version requires cloud access during use.
02

Assemble the battery, Pi Zero and Whisplay HAT

With all power disconnected, mount the PiSugar 3 beneath the Raspberry Pi Zero 2 W and align the Whisplay HAT over the complete 40-pin header.

  • Never attach or move a HAT while powered.
  • Check the first and last GPIO pins before pressing the boards together.
  • Use the supplied spacers so no solder joint or metal fastener touches the battery.
03

Boot, connect over SSH and update the Pi

Start on stable external power, connect to the configured hostname and update Raspberry Pi OS before adding the hardware driver.

Terminal
ssh your-user@your-hostname.local
sudo apt update
sudo apt full-upgrade -y
04

Install and test the reviewed Whisplay driver

Clone the official driver, pin the revision reviewed by LocalClaw, install it and reboot. Run the supplied hardware example before installing the chatbot.

Terminal
cd ~
git clone https://github.com/PiSugar/Whisplay.git --depth 1
cd Whisplay
git checkout a695240f866257033414697d47c3aa4c5f9b749c
sudo bash install_driver.sh
sudo reboot

Note: After reboot, use the official example test to confirm the display, button, LEDs, microphone and speaker. Do not debug the cloud API until the hardware passes.

05

Install and build the reviewed chatbot

Clone the PiSugar application, pin the reviewed revision, install its dependencies and build the interface.

Terminal
cd ~
git clone https://github.com/PiSugar/whisplay-ai-chatbot.git
cd whisplay-ai-chatbot
git checkout ee7301b2f7693111ee016f81c48a75d3387a7326
bash install_dependencies.sh
source ~/.bashrc
bash build.sh
06

Configure cloud speech, chat and voice safely

Run the interactive wizard and select OpenAI for ASR, LLM and TTS. Enter the API key only on the Raspberry Pi, restrict the .env file and verify provider names without printing the secret.

  • ASR_SERVER=openai
  • LLM_SERVER=openai
  • TTS_SERVER=openai
  • Never paste OPENAI_API_KEY into screenshots, shell history, Git or support messages.
  • Review current API pricing and set account limits before repeated tests.
Terminal
cd ~/whisplay-ai-chatbot
whisplay configure
chmod 600 .env
grep -E '^(ASR_SERVER|LLM_SERVER|TTS_SERVER)=' .env

Note: The reviewed source currently defaults to hosted models when explicit overrides are absent. Provider availability and pricing can change, so confirm the current OpenAI documentation before choosing overrides.

07

Run one complete push-to-talk test

Start the chatbot in the foreground, press the Whisplay button, speak a short request and wait for the displayed and spoken answer.

Terminal
cd ~/whisplay-ai-chatbot
bash run_chatbot.sh
Test promptsSay hello in one short sentence.Give me one idea for a weekend project.

Note: A successful answer proves hardware, network and API access together. If volume is low, open alsamixer and adjust the Whisplay output before changing AI settings.

08

Install the PiSugar manager and check the battery

Install the official PiSugar power manager, select the PiSugar 3 model when prompted and verify that its service can read the battery.

Terminal
cd ~
wget -O pisugar-power-manager.sh https://cdn.pisugar.com/release/pisugar-power-manager.sh
bash pisugar-power-manager.sh -c release
systemctl status pisugar-server --no-pager

Note: The manager exposes a local web interface on port 8421. Change default credentials and do not expose it directly to the public internet.

09

Enable startup only after the foreground test passes

Stop the foreground process, run the official startup helper and inspect the service and log after reboot.

  • Run startup.sh as the normal user, not with sudo.
  • The helper may switch the Pi to headless multi-user mode.
  • If whisplay-daemon is installed, follow the current repository warning instead of creating a competing service.
Terminal
cd ~/whisplay-ai-chatbot
bash startup.sh
systemctl status chatbot --no-pager
tail -n 100 chatbot.log

Expected performance

Small hardware, cloud-dependent response time

Cloud speech recognition, language generation and speech synthesis from a pocket-sized Raspberry Pi interface. The Zero 2 W handles the display, button and audio stream while remote services do the heavy inference. Response time therefore depends on Wi-Fi, API availability and the selected models.

Local workload
Screen, button, microphone capture, audio playback and API client
AI inference
Remote; no LLM, ASR or TTS model weights run on the Pi Zero in this configuration
Latency
Depends on Wi-Fi, upload speed, provider availability and selected cloud models
Battery
1200 mAh portable pack; runtime varies with load, audio volume, Wi-Fi and battery condition

Troubleshooting

The failures that look mysterious

Prove the screen, microphones and speaker before debugging the API. Then test credentials and network access before enabling the boot service.

The screen, button or audio does not work

Return to the Whisplay driver example. Recheck 40-pin alignment, driver installation and ALSA devices before touching API configuration.

The chatbot reports an authentication or quota error

Confirm the key belongs to the intended API project, billing or credits are available and the account can access the configured services. Replace a leaked key immediately; never print it for debugging.

Recording works but no answer arrives

Verify Wi-Fi and DNS from the Pi, then inspect chatbot.log for the provider stage that failed. A browser subscription does not automatically include API credit.

The response is delayed or cuts out

Test close to the Wi-Fi access point, reduce competing traffic and use a short prompt. Cloud response time includes upload, speech recognition, generation, synthesis and download.

The speaker is too quiet or distorted

Use alsamixer to adjust the Whisplay output and rerun the hardware audio test. Avoid maximum gain if it clips; this is independent of the cloud model.

startup.sh refuses because whisplay-daemon is present

Do not run two managers for the same hardware. Use the repository daemon registration path, or deliberately stop and disable the daemon before choosing the legacy chatbot.service mode.

Sources and credit

Follow the work back to its creators

Jdaie Lin published the original Pi Zero 2 W tutorial on the PiSugar Studio channel. PiSugar maintains the Whisplay driver, chatbot application and battery software used by the build. LocalClaw's page is independent and does not imply endorsement by any cited creator, model author or tool maintainer.

License note: The Whisplay chatbot is GPL-3.0 and the Whisplay hardware driver identifies Apache-2.0 licensing. OpenAI is a Hosted API service governed separately by provider terms and billing. LocalClaw links to the original projects and does not redistribute their code, credentials, video or model outputs.

Questions

Pocket Raspberry Pi chatbot FAQ

Does this Pi Zero 2 W chatbot work offline?

No in the documented configuration. The Pi handles the interface and audio, but speech recognition, the language model and speech synthesis use cloud APIs. Internet access, a valid key and available API credit are required for normal conversations.

How is this different from the Raspberry Pi 5 offline assistant?

This project is smaller and uses a PiSugar 3 1200 mAh battery, but sends AI work to the cloud. The separate Pi 5 guide downloads Whisper, Qwen3 and Piper so the demonstrated conversation loop can run locally after setup.

Does a ChatGPT subscription pay for the API?

No. ChatGPT subscriptions and API billing are separate. Create an API project, review current pricing and set spending limits before using the device.

Can I use the official prebuilt image?

Yes. PiSugar publishes a basic image for a Pi Zero 2 W, Whisplay HAT, PiSugar 3 and 16 GB or larger card. Check the release notes, update it, replace placeholder credentials and test each hardware function after flashing.

How long will the 1200 mAh battery last?

The official documentation identifies the capacity but this guide does not promise a runtime. Screen brightness, speaker volume, Wi-Fi activity, CPU load, battery age and power settings all affect it.

Has LocalClaw physically reproduced this build?

No. Jdaie Lin demonstrated the completed device. LocalClaw verified the tutorial metadata, hardware list, current repositories, official documentation and install path, but has not physically assembled it.

← Browse Community DIY Builds