OM. ← Back to portfolio

ENGINEERING • AI • ASSISTIVE TECHNOLOGY

Whispering Hat

A Raspberry Pi 5 wearable assistive computing system that detects nearby obstructions and speaks alerts to the wearer, while its perception, decisions, speech, and device controls run locally without Wi-Fi or cloud services.

GitHub repository ↗

YEAR2026
TYPEEngineering Project
ROLEDesigner & Developer
STATUSOffline prototype
Whispering Hat assistive technology project
Whispering Hat prototype

OVERVIEW

Awareness with context

Whispering Hat is a wearable assistive AI system designed to help blind and visually impaired people move through the world with more awareness and confidence.

Instead of describing everything in view, the hat focuses on information that can help in the moment: an obstacle in the walking path, something getting closer, or a person the wearer may recognize. It turns those observations into short spoken alerts, helping the wearer notice important changes without being overwhelmed by constant narration.

Image recognition can also help the wearer know who they are interacting with by identifying familiar people locally. Facial-expression recognition adds another layer of social context by describing visible cues such as a smile, surprise, or concern, helping the wearer take part in conversations and understand the emotional tone of an interaction. These are estimates of what is visible, not claims about what someone is truly feeling.

By bringing this awareness directly to the wearer through local audio, the project can support more independent movement and make nearby surroundings easier to understand. Voice controls also let the wearer pause or resume detection when they choose.

DEMONSTRATION

Whispering Hat in operation

Watch the wearable system detect nearby obstructions and communicate relevant alerts to the wearer.

Whispering Hat demonstration.

Watch the demonstration on YouTube ↗

THE CHALLENGE

Useful alerts, not constant narration

A normal object detector can identify dozens of things in a camera frame, but announcing every detection would overwhelm a blind user. Whispering Hat therefore evaluates context before deciding whether a spoken alert is useful.

  • What the object is, where it is, and whether it is inside the walking path
  • How far away it is, whether distance is shrinking, and whether its bounding box is growing
  • Whether a collision may be approaching or the hazard level has increased
  • Whether the system already warned the wearer
  • Whether a person is known and what visible facial expression is estimated

Another important direction for the project is reading diagrams. A future mode could describe the layout of a chart, map, science figure, or classroom diagram in words, helping a visually impaired student access visual information without needing someone beside them.

PROCESSING PIPELINE

From seeing to speaking

01SEE - Camera Module 3 WidePicamera2/libcamera captures a 640x480 stream with continuous autofocus. A background camera worker keeps only the newest frame, so inference does not build up a queue of stale views.
02DETECT - YOLO11n + ByteTrackYOLO11n detects selected environment-relevant classes and ByteTrack gives objects persistent identities. Detection answers what is there; tracking helps answer what it is doing.
03MEASURE - VL53L5CXA dedicated worker reads the 8x8 Time-of-Flight grid at a requested 12 Hz, validates measurements, and keeps the newest usable spatial depth map.
04RECOGNIZE - Known peopleHOG face detection locates faces, then locally cached face encodings are compared for identity matching on the Raspberry Pi.
05INTERPRET - Facial expressionA bundled FER2013 TensorFlow Lite model estimates visible expressions. Predictions are smoothed so spoken labels do not flicker from reading to reading.
06ASSESS - Risk engineObject position, depth, motion, approach, time-to-collision, detection history, and walking-corridor position are combined into SAFE, NOTICE, CAUTION, or STOP.
07SPEAK - Obstruction alertsWhen a nearby obstruction matters, eSpeak and the local audio output produce a concise spoken alert for the wearer.
08CONTROL - Microphone commandsThe microphone receives “detection on” and “detection off” through SpeechRecognition/PyAudio and Vosk, keeping device control local as part of the fully offline system.

CORE ARCHITECTURE

Local sensor fusion

All awareness and decision-making runs inside the Raspberry Pi 5 local processing boundary. Camera capture, depth sensing, inference, risk logic, speech, and voice control are coordinated as separate workloads rather than one blocking loop.

Camera Module 3 Wide → YOLO11n → ByteTrackVisual input, object classes, persistent tracking IDs, and motion history
VL53L5CX 8x8 depth gridIndependent spatial distance measurements and central-path obstacle sensing
Camera / depth alignment → per-object depth matchingCamera asks what an object is; the depth grid asks how far away it is
HOG face detection + cached face encodingsKnown-person identity matching, with OpenCV Haar fallback for face localization where needed
FER2013 TensorFlow LiteVisible facial-expression estimates
↓
Distance + approach speed + time-to-collisionSmoothed depth history and bounding-box growth provide complementary movement signals
↓
Walking corridor + context risk engineObject position, distance, motion, category, detection history, identity, and expression context
↓
SAFE / NOTICE / CAUTION / STOPEngineered rules classify situations and alert memory prevents unnecessary repetition
↓
Priority speech queue → eSpeak + PipeWireSTOP can clear lower-priority speech and interrupt current playback
Nearby obstruction → eSpeak + PipeWire audioLocal spoken alerts tell the wearer when an obstruction matters
USB microphone → SpeechRecognition/PyAudio → VoskRestricted “detection on” / “detection off” commands control awareness

OBJECT AWARENESS

Risk depends on context

Whispering Hat does not simply speak the name of every object YOLO detects. Its rules classify situations as SAFE / PASSIVE, NOTICE, CAUTION, or STOP, then modify those risks using the walking corridor and the object's category.

  • People receive context-aware notices or cautions rather than constant STOP warnings at ordinary conversation distance.
  • Vehicles are treated more aggressively when close or approaching.
  • Animals become more important with distance and approach behavior.
  • Chairs, benches, bags, and suitcases matter more when low in the image and inside the path.
  • Traffic lights and stop signs are normally passive visual context.
  • Real ToF time-to-collision information can further escalate an in-path result.

The risk score is built from engineered rules and sensor information, not copied from YOLO confidence. A trapezoidal walking corridor makes objects in the path more important than objects at the side, while camera/depth fusion adds real distance and time-to-collision signals. Short tracking and alert histories smooth approach signals and prevent the same warning from being repeated on every frame.

HUMAN AWARENESS

More than the class "person"

Known-person recognition

HOG face detection locates a face, then the local face_recognition pipeline compares its encoding with the cached entries in known_faces_cache.pkl. A matched name can replace the generic word “person” in an alert.

Facial-expression estimation

The bundled FER2013-style TensorFlow Lite model estimates angry, disgust, fear, happy, sad, surprise, or neutral from a cropped face. Readings are smoothed; this is visible-expression estimation, not knowledge of a person's internal emotion.

COMPLETELY OFFLINE

Local by design

Whispering Hat is designed so its core awareness system does not depend on Wi-Fi or cloud services.

YOLO11n, ByteTrack, VL53L5CX processing, risk logic, HOG face detection, cached face matching, FER2013 TFLite inference, Vosk recognition, and eSpeak speech output operate locally on the Raspberry Pi. Once the models and software are installed, no cloud inference is required.

No Wi-Fi required for core operation.

Vosk accepts only “detection on” and “detection off.” Turning detection off pauses awareness processing while the camera continues running, making voice control deliberately simple rather than a general assistant.

TECHNICAL STACK

Built on Raspberry Pi 5

Compute

Raspberry Pi 5

Operating system

Raspberry Pi OS Trixie / Linux

Vision and camera API

Camera Module 3 Wide with Picamera2 + libcamera

Detection and tracking

YOLO11n + ByteTrack

Depth and interface

VL53L5CX 8x8 Time-of-Flight with SparkFun Qwiic / I2C

Face identity

HOG face detection, face_recognition encodings, and local pickle cache

Expression model

FER2013 TFLite / LiteRT-compatible inference

Voice and audio

Vosk + SpeechRecognition + PyAudio; eSpeak and PipeWire / pw-play

Processing and data

Python, OpenCV, NumPy, and CSV event logging

ENGINEERING FOCUS

Coordinating asynchronous systems

The difficult part was not running one AI model. It was getting everything to work together quickly enough to be useful. The camera may produce frames faster than YOLO can process them, while the depth sensor produces a separate 8x8 coordinate system that must be aligned with the camera view.

Background workers, latest-frame capture, scheduled inference, tracking and depth memory, face memory, expression smoothing, alert memory, priority queues, cooldowns, and risk escalation keep one slow operation from freezing the wearable system. Face recognition, emotion inference, voice recognition, and speech therefore run on their own schedules or workers.

REFLECTION

What I learned

The hardest part of Whispering Hat was not getting YOLO, a distance sensor, or a face model to work individually. It was deciding how all of them should work together.

  • An object detector can tell me that a chair exists, but that alone does not tell a blind wearer whether the chair matters.
  • Walking-corridor logic made location important; the VL53L5CX made real distance available; tracking made it possible to follow individual objects over time.
  • Distance history, bounding-box growth, and time-to-collision added multiple ways to recognize danger.
  • Face matching can turn a generic person detection into the name of someone the wearer knows, while expression estimation adds optional social context.
  • Alert memory and prioritized speech made the system more selective about what it actually says.
  • The biggest lesson was that assistive AI is not about announcing everything a model can recognize. It is about deciding which information deserves the user's attention.