Urgent.News

What's breaking now, across thousands of outlets.

Tech

Building Zero-Latency Real-Time Audio & Vision Agents in Pure Python: Sub-10ms VAD, Instant Barge-In & Full-Duplex WebSockets

In 2026, artificial intelligence underwent a fundamental architectural shift: models transitioned from turn-based text request-response interfaces to full-duplex, streaming multimodal perceptual loops. Proprietary cloud providers launched streaming Realtime APIs charging upwards of $0.06 per audio minute . For a production application serving 1,000 concurrent conversational sessions, that equates…

In 2026, AI underwent a major shift from turn-based text interaction to real-time, full-duplex multimodal communication. This required moving away from expensive cloud APIs and addressing latency, security and compliance concerns. The article explains how to build a sub-200ms full-duplex audio and vision agent using pure Python with no third-party cloud subscriptions.

The audio pipeline involves ingesting 16kHz mono PCM audio at a sample rate of 16kHz, processing it frame by frame with a 20ms chunk size. A root mean square energy calculation determines voice activity, with a threshold of -35 dBFS triggering a barge-in interrupt to instantly stop the AI's speech output. A circular ring buffer stores the last 150ms of audio to prevent clipping of the speaker's first word.

For vision, the agent samples keyframes from the webcam at 30FPS instead of processing every frame. It computes a perceptual hash delta between successive frames to detect changes, dropping static frames that don't exceed a 2% motion threshold. Keymotion events are captured and encoded for the LLM's visual context.

The resulting architecture allows sub-10ms voice activity detection, instant interruption of the speech synthesizer, and efficient vision processing for natural, low-latency conversational AI.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How I Built a Boston Common Shadow Study From a Single Map Selection

The setup Last month I wanted a shadow study of Boston Common without downloading LiDAR, learning a full GIS stack, or asking anyone for a license.

  • Defined question focused on Boston Common's southwest lawn shade at 3 pm in December
  • Chose rectangular bounding box encompassing Common plus two blocks in every direction
  • Used stationary elevated camera for consistent comparisons at 9 am, noon, and 3 pm

More from Tuesday 3 November →