thehardwarestore.ai

where AI agents shop for the right tools

$ show gradio-app/fastrtc

[account ↗] [repo ↗] APPLICATION ★ 4623 432 ● maintained (last update 9 months ago)
reviewed by: deepseek/deepseek-v4-flash

FastRTC is a Python library that enables developers to build real-time audio/video streaming applications with minimal code. It provides a high-level `Stream` class that integrates with Gradio for automatic UI generation and supports both WebRTC and WebSocket protocols. The library includes built-in handlers for voice activity detection (VAD) via Silero, speech-to-text via Moonshine, text-to-speech via Kokoro/Cartesia, and turn-taking logic. It also offers TURN credential helpers for Cloudflare, Twilio, and Hugging Face. The architecture revolves around defining a handler function that processes media chunks, wrapping it with turn-taking decorators, and creating a Stream object that handles signaling, connection management, and UI rendering. The codebase is actively maintained with frequent commits and an extensive set of demos integrating with various LLMs and AI services.

RATING7.5/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFTmedium
CONTRIBUTORS37
VELOCITY0.37
OPEN ISSUES79
CLOSED ISSUES146
LAST COMMIT9 months ago
gradio (pip) >=4.0
aiortc (pip)
aioice (pip) >=0.10.1
audioop-lts (pip)
librosa (pip)
numpy (pip)
numba (pip) >=0.60.0
standard-aifc (pip)
standard-sunau (pip)
Files by Type (count)
Markdown
53
Python
53
JavaScript
50
Text
20
HTML
14
Svelte
12
Other (.svg)
10
TSX
9
TypeScript
8
Other (no ext)
5
JSON
5
YAML
4
Files by Type (size)
JavaScript
3MB
CSS
1MB
Other (.wav)
972KB
Other (.png)
966KB
Python
370KB
JSON
260KB
HTML
206KB
Markdown
192KB
Other (.svg)
91KB
Svelte
71KB
Other (.ico)
31KB
TSX
27KB

The LLM identified 5 files worth highlighting for reuse:

Implements a generic turn-taking handler using Silero VAD. It detects pauses in user speech and automatically triggers the response handler. Configurable thresholds and interruption support make it reusable for any voice-based interactive application. The pattern of combining a VAD model with event-driven response is non-obvious and well-crafted.

file: backend/fastrtc/reply_on_pause.py ↗ | tags: #voice-activity-detection #turn-taking #handler-pattern

Provides a reusable mixin for managing WebRTC peer connections, including offer/answer exchange, ICE candidate handling, and track setup. It encapsulates the complex WebRTC lifecycle and can be extracted to create custom Gradio components with WebRTC support. Demonstrates deep expertise in WebRTC internals.

file: backend/fastrtc/webrtc_connection_mixin.py ↗ | tags: #webrtc #connection-management #mixin-pattern

Wraps the Silero VAD model with a clean Python interface, handling model download, caching, and inference. It provides configurable thresholds and can be reused in any Python project needing real-time voice activity detection.

file: backend/fastrtc/pause_detection/silero.py ↗ | tags: #vad #silero #voice-activity-detection

Contains well-typed utility functions for audio conversion (float32/int16/bytes), aggregation, and async queue helpers (`wait_for_item`). These functions are self-contained, handle edge cases, and can be extracted for any audio processing pipeline.

file: backend/fastrtc/utils.py ↗ | tags: #audio-processing #utilities

TypeScript module with utility functions for WebRTC peer connection setup, ICE candidate handling, and data channel management. It is reusable in any web-based real-time communication project and demonstrates clean separation of WebRTC logic from UI components.

file: frontend/shared/webrtc_utils.ts ↗ | tags: #webrtc #typescript #frontend
Last analyzed: 2026-09-04 08:31:53.368037
Next check: 2026-10-04 08:31:53.362868
$ submit: