from RealtimeSTT import AudioToTextRecorder
def process_text(text):
print(text)
if __name__ == '__main__':
recorder = AudioToTextRecorder()
while True:
recorder.text(process_text)
Voice Activity Detection — Automatically detects when you start and stop speaking.
Real-time Transcription — Converts speech to text with low latency using Faster Whisper.
Wake Word Activation — Triggers recording when a designated wake word is detected.
GPU Acceleration — Supports CUDA for faster speech-to-text processing.
RealtimeSTT handles microphone input and transcribes it instantly with integrated voice activity detection and wake word support. Built on industry-standard components (Faster Whisper, SileroVAD, Porcupine), it's designed for voice assistants and real-time applications. The library exposes a simple callback-based API while offering Docker and CLI interfaces for server deployments.
Python 3.7+, PortAudio (Linux: portaudio19-dev, macOS: brew install portaudio). Optional: NVIDIA GPU with CUDA for acceleration.