Open Source
Explore the latest AI open-source projects from GitHub and HuggingFace.
Explore the latest AI open-source projects from GitHub and HuggingFace.
## Introduction RealtimeSTT is a Python library that delivers robust, low-latency speech-to-text transcription with integrated voice activity detection and wake word activation. With nearly 10,000 GitHub stars, it has become one of the most widely adopted open-source solutions for real-time speech recognition in Python applications. The library abstracts away the complexity of combining multiple audio processing components into a single, cohesive API that developers can integrate in just a few lines of code. What makes RealtimeSTT particularly valuable is its pragmatic engineering approach. Rather than trying to reinvent speech recognition from scratch, it orchestrates best-in-class components: Faster Whisper for GPU-accelerated transcription, WebRTCVAD and SileroVAD for voice activity detection, and Porcupine or OpenWakeWord for wake word detection. The result is a production-grade library that handles the messy realities of real-time audio processing, including background noise, speaker pauses, and activation triggers. ## Core Architecture RealtimeSTT's architecture is built around a multi-stage audio processing pipeline that runs in a separate process via Python's `multiprocessing` module, ensuring that audio capture and transcription do not block the main application thread. The pipeline operates in three stages: **Stage 1 - Voice Activity Detection (VAD)**: Incoming audio is first passed through WebRTCVAD, a lightweight voice activity detector that provides fast initial filtering. Audio segments that pass this first gate are then verified by SileroVAD, a neural network-based detector that offers higher accuracy. This two-tier approach balances responsiveness with precision, minimizing both false positives and missed speech segments. **Stage 2 - Wake Word Detection (Optional)**: When configured, the system listens for specific trigger phrases before activating transcription. Supported wake words include common triggers like "alexa", "hey google", "hey siri", "jarvis", and "computer", among others. Both Porcupine and OpenWakeWord backends are supported. **Stage 3 - Speech Transcription**: Detected speech segments are transcribed using Faster Whisper, an optimized implementation of OpenAI's Whisper model that leverages CTranslate2 for GPU acceleration. The library supports all Whisper model sizes, allowing developers to trade accuracy for speed based on their requirements. | Component | Technology | Purpose | |-----------|------------|--------| | Initial VAD | WebRTCVAD | Fast voice activity filtering | | Accurate VAD | SileroVAD | Neural network verification | | Wake Word | Porcupine / OpenWakeWord | Activation trigger detection | | Transcription | Faster Whisper | GPU-accelerated STT | ## Key Capabilities **Real-Time Streaming Transcription**: The library continuously monitors audio input and delivers transcription results as speech segments are completed. Developers receive callbacks for recording start, recording stop, and transcription completion events, enabling responsive UI updates and downstream processing. **Multiple Recording Modes**: RealtimeSTT supports three distinct usage patterns. Manual mode gives developers explicit control over recording start and stop. Automatic mode uses voice activity detection to handle recording lifecycle autonomously. Custom audio input mode accepts raw PCM audio chunks (16-bit mono, 16000Hz) via the `feed_audio()` method, bypassing microphone input entirely for integration with custom audio sources. **Callback Architecture**: The asynchronous callback system supports `on_recording_start`, `on_recording_stop`, `on_transcription_start`, and text delivery callbacks. This event-driven design integrates cleanly with GUI frameworks, web servers, and other asynchronous application architectures. **Cross-Platform Support**: The library runs on Linux, macOS, and Windows with platform-specific installation guides. GPU acceleration is available through NVIDIA CUDA (11.8 or 12.X) with appropriate PyTorch builds. **Extensive Configuration**: Developers can fine-tune voice activity detection thresholds, silence duration for auto-stop, wake word sensitivity, Whisper model selection, language hints, and numerous other parameters to optimize behavior for their specific use case. ## Developer Experience Getting started requires a single pip install: ```bash pip install RealtimeSTT ``` The minimal usage pattern is remarkably concise: ```python from RealtimeSTT import AudioToTextRecorder with AudioToTextRecorder() as recorder: text = recorder.text() print(text) ``` The automatic recording mode handles voice detection transparently, while the callback-based API provides full control for more complex applications. The `feed_audio()` method is particularly useful for server-side applications or scenarios where audio comes from sources other than a local microphone, such as WebSocket streams or file processing pipelines. Platform-specific prerequisites are well-documented: Linux requires `python3-dev` and `portaudio19-dev`, macOS needs `portaudio` via Homebrew, and Windows works with standard installation plus optional CUDA support. ## Limitations RealtimeSTT is a community-maintained project following the original maintainer stepping back due to time constraints, which introduces some uncertainty about long-term maintenance velocity. The library's reliance on Python's `multiprocessing` module requires the `if __name__ == '__main__':` guard pattern, which can be a stumbling block for developers unfamiliar with this requirement. Concurrent request handling for server deployments is noted as work-in-progress, limiting its readiness for high-throughput production services. The wake word detection depends on either the proprietary Porcupine library or the less mature OpenWakeWord alternative. Finally, while GPU acceleration is supported, the CUDA setup process across different platforms can be challenging for less experienced developers. ## Who Should Use This RealtimeSTT is an excellent choice for Python developers building voice-controlled applications, virtual assistants, dictation tools, accessibility interfaces, or any application that needs to convert live speech into text. Its minimal API surface makes it ideal for rapid prototyping, while the extensive configuration options and callback architecture support production deployments. Developers building IoT voice interfaces, meeting transcription tools, or voice-triggered automation systems will find RealtimeSTT significantly easier to integrate than assembling the underlying components manually. Teams that need wake word detection alongside transcription will particularly benefit from the library's integrated approach, avoiding the complexity of coordinating separate VAD, wake word, and STT systems.
ggml-org
Pure C/C++ port of OpenAI Whisper for edge deployment
Moonshine AI
Open-source ASR toolkit for edge devices that outperforms Whisper Large v3 with 6x fewer parameters and 44x faster inference, running on-device across all major platforms.