// project.build = "prj-003" · built by scarif labs
Voice Primitives · Audio Interface

Resonance

Low-latency voice and audio streaming that turns natural speech into an interactive product interface.

Identifier: prj-003Built by Scarif LabsStatus: prototype

An exploration into speech as an active interface material. Combines native WebRTC streaming with lightweight client-side signal processing.

WebRTCMachine LearningDSPWeb Audio APITypeScript
01 / challenge

The architectural challenge

Most voice interfaces feel sluggish and unnatural because they rely on multi-second round-trips: recording audio to a file, uploading it, running cloud speech-to-text, querying an LLM, generating TTS audio, and streaming it back. This 2-to-4 second latency completely breaks the rhythm of human conversation.

Constraint 01

Managing acoustic echo cancellation across varied hardware without dedicated headset microphones.

Constraint 02

Preventing audio buffer starvation and click artifacts during momentary network jitter.

Constraint 03

Achieving instant client-side voice activity detection without draining mobile device batteries.

02 / role

Scarif Labs' role & execution

Scarif Labs designed and built Resonance as an R&D initiative exploring real-time acoustic signal streaming and proactive voice interfaces.

Product & Interface Design
  • Designed reactive audio visualizer elements reflecting speech cadence, energy, and AI model attention in real-time.
  • Engineered fluid interruption ergonomics, allowing users to interrupt the system naturally without audio stuttering.
  • Designed ambient audio state indicators that communicate listening, thinking, and speaking states with subtle visual cues.
Systems & Software Engineering
  • Built a client-side Digital Signal Processing (DSP) pipeline using the Web Audio API and AudioWorklets for real-time voice activity detection (VAD).
  • Implemented a bidirectional WebRTC media channel streaming raw Opus audio frames to low-latency edge inference endpoints.
  • Created an interruption handler that immediately cuts off outgoing audio buffers the instant client microphone input exceeds acoustic thresholds.
03 / architecture

System architecture & solution

Resonance bypasses HTTP request/response lifecycles entirely. Audio is captured via browser `AudioWorkletNode`, filtered locally for background noise, and piped over a persistent WebRTC data/media channel. An edge streaming worker forwards chunks to streaming speech models, returning token and phoneme audio buffers with sub-300ms time-to-first-sound.

Engineering Solution:

Employed an ultra-lightweight client WebAssembly VAD model running inside an isolated Web Worker, sampling at 16kHz with minimal CPU consumption and instantaneous speech threshold triggering.

04 / outcomes

Verified results & benchmarks

Benchmark Metric

Reduced end-to-end voice round-trip latency from ~2,400ms down to ~380ms.

Benchmark Metric

Natural conversational interruption capability functioning seamlessly across desktop and mobile browsers.

Benchmark Metric

Demonstrated reliable real-time voice-driven software navigation without keyboard or mouse input.

// lessons_learned
When building conversational AI software, latency is not a performance optimization—it is the user interface. Above 600ms, users think the system is broken; below 400ms, the interaction becomes conversational.

Related capabilities & technical research

06 / intake

Need custom systems built with this level of craft?

We engineer scalable infrastructure, real-time sync, and production web platforms from scratch.