Inspiration
As a practicing gastroenterologist, I see many patients who struggle to remember or understand bowel preparation instructions before their colonoscopy. Missing or misunderstanding prep can result in poor visualization, repeated procedures, and unnecessary patient anxiety.
At the same time, I’ve been inspired by the rise of open-source OSS language models and wanted to explore how far we can push their accessibility — even onto low-cost edge devices like a Raspberry Pi.
This project grew out of the intersection of:
- Clinical need: Helping patients get clear, personalized, repeatable prep instructions.
- Open AI models: Experimenting with GPT-OSS, Whisper, and Piper as fully local tools.
- Accessibility & inclusivity: Making AI assistants work offline and on affordable hardware.
What it does
Advise patients on preparing for a colonoscopy
How we built it
- Hardware: Raspberry Pi 5 (16 GB) 7” Roadom touchscreen USB microphone/speaker setup
- Software: Whisper.cpp for speech-to-text (STT) GPT-OSS 20B (quantized by Unsloth) with Ollama for reasoning Piper TTS for text-to-speech A shell loop for live STT → LLM → TTS A Streamlit UI for kiosk-style demo on the touchscreen
- Process: Set up RPi 5 with PiOS and necessary build tools. Installed and built Whisper.cpp, Ollama, and Piper. Pulled GPT-OSS quantized GGUF from Hugging Face (Unsloth). Designed a bash loop (pi_coach.sh) to capture audio, transcribe, query the LLM, sanitize outputs, and speak them back. Created a Streamlit UI (pi_coach_ui.py) for a simple touchscreen-based kiosk.
Challenges we ran into
- Model compatibility: Different OSS models (Ollama, Whisper.cpp, Piper) update frequently, and CLI flags or file paths often broke older instructions.
- Hardware limits: GPT-OSS 20B is heavy; balancing quantization and responsiveness on a Raspberry Pi required patience.
- Voice cleanup: The LLM often produced meta-reasoning text; we had to engineer sanitization filters and tiny guardrail prompts to ensure only concise patient-friendly responses were spoken.
- Debugging in unknown territory: Unfamiliarity with CMake errors, deprecated Hugging Face CLI, and ALSA device mapping slowed progress — but each problem was eventually solved through iteration.
Accomplishments that we're proud of
- A working prototype of a fully offline, Pi-based voice assistant for colonoscopy prep.
- Patients (in the future) could simply ask, “Can I drink coffee today?” and receive a short, empathetic, spoken answer like: “No, avoid coffee before your colonoscopy; stick to clear liquids.”
- The project demonstrates that accessible AI healthcare tools can be built using open-source models and inexpensive hardware.
What we learned
- Quantization & model optimization: Learned how GGUF and MXFP4 quantization enable very large models (20B parameters) to run on consumer-grade hardware.
- Speech processing pipeline: Explored how Whisper.cpp and Piper TTS can be chained with GPT-OSS to create a “talk → think → talk” loop.
- Edge AI feasibility: Discovered that even on a Raspberry Pi 5, it’s possible to run an end-to-end voice assistant locally with no cloud connection.
- It was surprising — and motivating — to realize that patients could eventually use this without relying on the internet.
What's next for Colonoscopy Prep Coach on Raspberry Pi
- Train or fine-tune smaller GPT-OSS models for domain-specific medical prep coaching, improving both speed and accuracy.
- Expand beyond colonoscopy prep into general procedure readiness coaching (endoscopy, surgery, imaging).
- Explore Arduino or simple robotics add-ons (e.g., LED indicators or printed handouts) for multimodal patient guidance.
- NVIDIA Jetsons?
Built With
- alsa
- bash
- gpt-oss20bquantized
- ollama
- piper
- python
- raspberry-pi
- streamlit
- unsloth
- whisper
Log in or sign up for Devpost to join the conversation.