Emma's Voice: Private On-Device Lip, Tongue, and Cheek Tracking for Non-Verbal Autism Imitation
Teaching a non-verbal autistic child to imitate mouth movements and early words requires immediate, joyful feedback, and zero cloud surveillance of a child's face. We built an open, browser-native tablet companion that runs 478-point facial vision, hybrid tongue-chroma estimation, Pixar-style Three.js animal buddies, and neural speech synthesis completely locally.
We present Emma's Voice, an open-source, zero-backend tablet web application designed to help non-verbal autistic children practice playful lip, tongue, and cheek imitation (Moves Mode) and transition into early spoken words (Words Mode). Because standard browser face-mesh models lack 3D tongue landmarks and under-report subtle child tongue and cheek-puff gestures on real webcams, we introduce a calibrated hybrid vision pipeline combining MediaPipe Face Landmarker (478 landmarks + 52 ARKit blendshapes) with an adaptive inner-mouth pink-tongue chroma tracker and 3D mid-cheek expansion geometry. On the feedback side, we pair visible color-coded camera tracking lines with procedurally sculpted Three.js plush animal buddies (Teddy Bear, Sunny Puppy, Cozy Bunny), private IndexedDB parent video recording, and local Piper VITS WebAssembly neural speech, achieving sub-frame tracking, 0-byte cloud transmission, and immediate sensory-safe felicitation on standard tablets.
1. Start with playful moves, then bridge to words
When building assistive tools for a non-verbal autistic child, jumping straight into multi-syllable word drills often creates friction before joint attention and mirror imitation are established. At the same time, speech-language pathology (SLP) literature (including ASHA clinical guidance) emphasizes that non-speech oral-motor exercises alone do not replace functional communication practice.
Emma's Voice therefore organizes practice into a single-tap two-stage loop:
- Stage 1: Moves Mode (Default): Nine concrete, visually unmistakable oral-motor moves grouped across Lips (Open Wide, Kiss Lips, Big Smile, Press & Pop), Tongue (Tongue Out, Tongue Wiggle, Tongue Up, Tongue Down), and Cheeks (Puff Cheeks). Matching any move triggers an immediate sunburst halo, confetti celebration, musical fanfare, and enthusiastic spoken cheer.
- Stage 2: Words Mode: Eighteen high-motivation early core words (Mama, Dada, More, Ball, Water, Milk, Open, Bubbles, Help…) plus custom parent words in multiple languages. Whenever the child moves her lips intentionally above an adaptive resting baseline, the app immediately models the target word out loud, requiring zero vocal sound, which is critical for non-verbal learners.
2. Hybrid vision: fixing real-webcam blind spots for lips, tongue, and cheeks
Live testing on real webcams exposed three failure modes that rarely show up in synthetic benchmarks, each requiring a concrete engineering fix:
- Monotonic timestamp safety for MediaPipe VIDEO mode: Mixing
performance.now()on startup withrequestAnimationFramevsync timestamps caused a timestamp regression on frame 2, halting tracking with frozen lip contours. Enforcing strictly monotonic integer timestamps (Math.max(lastDetectTs + 1, Math.floor(performance.now()))), decoupling frame stepping from stalledvideo.currentTimeon liveMediaStreams, and adding automatic GPU → CPU fallback made tracking lock onto real lips continuously. - Hybrid Inner-Mouth Tongue Chroma Tracker: Out of the box, MediaPipe Face Landmarker provides no 3D tongue landmarks, and its neural
tongueOutblendshape typically peaks around0.10-0.25on ordinary webcams. Inspired by oral-motor rehab pipelines such as ORAR and LAOLA, we crop a56×48offscreen canvas tightly around the inner lip ellipse (excluding outer lip skin), sample local chin skin tone to adapt to lighting, filter out dark oral-cavity shadow and bright white teeth, and track the centroid of warm pink tongue pixels inside and just below the mouth opening. Combining amplified neuraltongueOutwith this inner-mouth pink fill reliably tracks Tongue Out, Tongue Wiggle, Tongue Up, and Tongue Down while drawing a live magenta tongue vector on the camera feed. - 3D Cheek-Expansion Puff Detection: MediaPipe's
cheekPuffblendshape is similarly conservative (0.08-0.22). Pairing amplifiedcheekPuffwith an adaptive baseline of mid-cheek 2D span (landmarks187↔411normalized by inter-ocular distance) and forward Z-bulge toward the camera (gated by closed lips) turns Puff Cheeks into a responsive, playful target with glowing cheek arcs drawn live over the face.
3. Why we replaced a photorealistic 3D human with Pixar-style plush buddies
Negative UX results matter just as much as negative benchmark results. Our first Three.js iteration rendered a photorealistic 3D human scan (avaturn.glb) driven by 72 ARKit blendshapes and an articulated 3D tongue. Technically, it worked on the first try with zero console errors, yet watching a hyper-realistic 3D scanned human stick out a glossy tongue and puff its cheeks landed squarely in the uncanny valley, feeling eerie rather than warm and inviting for a young child.
We pivoted to procedurally sculpted, velvet-shaded Pixar-style 3D plush animal buddies in Three.js (Teddy Bear, Sunny Puppy, and Cozy Bunny) selectable in one tap right on the Watch & Copy card:
- Zero uncanny valley, instant 0 ms load: No 14 MB model download delay; soft
MeshPhysicalMaterialplush sheen, big glossy eyes with dual catchlights, wiggling ears, inflatable 3D rosy cheeks, seamless continuous coral lips, and a clear glossy 3D pink tongue with pulsing directional guide arrows. - Real human video modeling when you want it: Because pediatric autism research identifies parent/caregiver video modeling as the gold standard, any move or word can be swapped in one tap using the built-in Record Video (or Upload) button (stored privately in IndexedDB) with a matching Remove Video button to return to the 3D buddy anytime.
4. Warm local neural speech, without sounding sad or robotic
Browser speechSynthesis varies wildly across devices and frequently drops to robotic espeak voices on Linux and older tablets. To guarantee natural human speech everywhere without sending audio to cloud TTS APIs, we integrated Piper VITS WebAssembly (@diffusionstudio/vits-web), caching the ONNX voice model permanently in the browser's Origin Private File System (OPFS) and caching generated WAV blobs in memory for 0 ms replays.
Real-world listening caught a subtle emotional issue: our initial default voice (en_US-amy-medium at 0.85×) came from a calm audiobook corpus and sounded slightly melancholy during celebrations. Switching the default to Kristin (en_US-kristin-medium) at an upbeat 1.04× tempo (with subtle pitch brightness during felicitation cheers and 10 selectable multilingual voices across English, Spanish, Portuguese, and French) transformed the app's tone into warm, joyful encouragement.
5. Grounded in autism & oral-motor vision literature
| Research / System | Key Finding | How It Shaped Emma's Voice |
|---|---|---|
| Drimalla et al. (2021) · Molecular Autism | Autistic individuals accurately imitate modeled facial/mouth shapes when explicitly shown, but move more slowly. | Built-in 0.5× Slow Coach toggle, forgiving hold windows, and 1-10 sensitivity slider. |
| JEMImE & LIFEisGAME | Webcam serious games with live visual match gauges and expressive avatars improve ASD imitation engagement. | Live Move Match gauge, circular hold-to-match ring, and non-punitive felicitation banners (no red-X failure cues). |
| CAMI-2D / CAMI-2DNet | A single standard 2D front webcam reliably tracks child motor imitation without depth hardware. | Zero-hardware tablet web app running over HTTPS with exact cover-fit mirror calibration. |
| LAOLA & ORAR | MediaPipe Face Mesh lacks native 3D tongue landmarks and benefits from cropped mouth-ROI vision stages. | Hybrid MediaPipe + inner-mouth pink-tongue chroma tracker + 3D cheek-expansion detector. |
6. Try Emma's Voice live on any tablet
Emma's Voice is completely open-source and runs privately inside Safari (iPad), Chrome (Android), or desktop browsers, add it to a tablet's Home Screen for full-screen standalone use. As always in clinical practice, it is built as a joyful home companion alongside a licensed Speech-Language Pathologist and your child's preferred communication/AAC tools.
Everything runs 100% locally in the browser, camera frames, neural speech, and parent-recorded videos never leave your device.