Skip to main content
ZombieMutex

30 results · ↑ ↓ navigate · Enter open · Esc close

Speech & audio ML engineering

Project 04 / 05 · Low-latency inference

Implemented and tested

Streaming Speech Inference & Endpointing

I implemented frame-based streaming speech activity detection with hysteresis and endpoint hangover, then exercised it against synthetic telephony filtering, noise, packet loss and packet-arrival jitter.

In a live conversation, the agent needs to know when to listen, when to respond and when to stop talking. Endpointing too early cuts a person off; too late makes the entire system feel sluggish.

What I implemented

  • Implemented a 20-ms streaming VAD state machine with configurable energy threshold, speech confirmation and silence hangover.
  • Built deterministic packet arrival jitter/loss schedules, simple telephony-style band filtering, and audio frame processing.
  • Measured per-frame events, algorithmic hangover and local compute real-time factor, separating them from actual network and model latency.

Data and execution path

  1. 01

    8-kHz mono PCM frame ingestion

  2. 02

    20-ms framing and signal-energy calculation

  3. 03

    Multi-frame speech confirmation

  4. 04

    Speaking/idle state transition with hangover

  5. 05

    Simulated packet loss, jitter and channel filtering

  6. 06

    Endpoint event times and locally measured compute cost

Experiment and results

On the included 1.25-second synthetic sample, the detector processed 63 20-ms frames and emitted a speech-start and speech-end event. The configured 8-frame hangover adds 160 ms of algorithmic trailing-silence delay. These are local signal-path observations, not end-to-end live-call latency or streaming-ASR results.

These results are from the specified local dataset or offline rendering pipeline. I keep them separate from real speech-corpus and live-call metrics because the populations and failure modes differ.

System-level constraints

  • A live media session introduces microphone/PSTN capture, RTP jitter buffering, sample-rate negotiation and bounded work queues beyond this signal model.
  • Turn-level latency combines ASR partial stability, endpoint delay, first audio, barge-in and tail response time; local VAD compute time is only one component.
  • Quantized inference and batching behave differently across CPU/GPU/ANE, thermal states, memory limits and frame deadlines.
  • Backpressure, cancellation, timeouts and fallback are system reliability properties; they cannot be inferred from model accuracy.

What the measurements establish

The detector uses energy thresholds rather than a trained neural speech activity model. Packet schedules are simulated; there is no PSTN/SIP/RTP connection, ASR inference engine or GPU benchmark.

A voice assistant with a great language model and terrible turn-taking is just a very articulate interrupter.