Skip to content
The AI Database
Screenshot of RealtimeSTT

RealtimeSTT

github.com

RealtimeSTT is an open-source Python library for low-latency speech-to-text in real-time applications. It provides voice activity detection, wake word activation and instant transcription, using components such as WebRTCVAD, SileroVAD and Faster Whisper.

Visit website (opens in a new tab)

At a glance

Category
Audio & Voice

GitHub - KoljaB/RealtimeSTT

Overview

RealtimeSTT is a powerful and efficient low-latency speech-to-text library developed for real-time applications. It features advanced capabilities such as voice activity detection, wake word activation, and instant transcription. This library is particularly useful for developers looking to integrate seamless speech recognition into their applications, such as voice assistants or any software requiring fast and accurate speech-to-text conversion.

Features

Key Functionalities

  • Voice Activity Detection (VAD): This feature automatically detects when a person is speaking, ensuring efficient use of system resources.
  • Real-Time Transcription: It transforms spoken language into text instantaneously, making it ideal for applications requiring fast feedback.
  • Wake Word Activation: Users can set specific keywords (like "Jarvis" or "Alexa") that trigger the speech recognition system.

Tech Stack

The library utilizes leading technologies:

  • Voice Activity Detection: Implements WebRTCVAD for initial detection, combined with SileroVAD for enhanced accuracy.
  • Speech-to-Text Conversion: Uses Faster_Whisper for instant transcription, optimized for GPU acceleration.
  • Wake Word Detection: Supports Porcupine or OpenWakeWord for detecting designated activation words.

Installation

To install the RealtimeSTT library, run:

pip install RealtimeSTT

This command installs the library along with necessary dependencies, including a CPU-only version of PyTorch. For enhanced performance, particularly on systems equipped with a GPU, users can set up CUDA.

Detailed Installation Steps

  • Linux: Install necessary dependencies via:

    sudo apt-get update
    sudo apt-get install python3-dev portaudio19-dev
    
  • macOS: Use Homebrew to install:

    brew install portaudio
    

For setups using CUDA, specific commands are provided to ensure compatibility with various versions.

Getting Started

Basic Example

Here is a quick example of how to capture and process speech input:

from RealtimeSTT import AudioToTextRecorder

def process_text(text):
    print(text)

if __name__ == '__main__':
    print("Wait until it says 'speak now'")
    recorder = AudioToTextRecorder()

    while True:
        recorder.text(process_text)

This simple program captures spoken phrases and prints them to the console as text.

Advanced Capabilities

  • Wake Word Recognition: To initiate recording based on a wake word:

    recorder = AudioToTextRecorder(wake_words="jarvis")
    
    print('Say "Jarvis" to start recording.')
    print(recorder.text())
    
  • Callbacks: Customize the library's behavior with callback functions for events like starting and stopping recording.

Applications

RealtimeSTT is particularly useful in various domains:

  • Voice Assistants: Ideal for creating interactive applications that respond to user voice commands.
  • Accessibility: Transcription capabilities can assist individuals who are hearing impaired.
  • Voice-Activated Technologies: Enhances IoT devices and smart home applications that require hands-free operation.

Further Development

The library is open for contributions, encouraging developers to enhance its features through collaborative efforts. The author, Kolja Beigel, actively develops the tool and supports an inclusive community around it.

Conclusion

RealtimeSTT offers an adaptable and comprehensive framework for integrating speech recognition into various applications. With its advanced features, efficient operation, and support for real-time processing, it serves as a foundational tool for developers aiming to leverage natural language processing in innovative ways. Whether for personal projects or enterprise solutions, RealtimeSTT provides the capabilities necessary to create powerful voice-interactive experiences.

For additional details, visit the official GitHub repository.

Ready to try it? Visit github.com (opens in a new tab)

  • Screenshot of Always-On AI Assistant
    Category
    AI Agents
    What it does
    An open-source GitHub repository providing a template for a continuously running voice assistant for engineering and development tasks. It combines Deepseek-V3 for reasoning, RealtimeSTT for speech input, and ElevenLabs text-to-speech for spoken responses.
  • Screenshot of OuteTTS-0.3-1B

    OuteTTS-0.3-1B

    huggingface.co
    Category
    Audio & Voice
    What it does
    OuteTTS-0.3-1B is an open-source text-to-speech model from OuteAI, built on the OLMo-1B base model. It supports English, Japanese, Korean, Chinese, French and German, and is used through the outetts Python package.
  • Screenshot of Goose

    Goose

    block.github.io
    Good for
    Builders
    Category
    AI Agents
    Lets you
    Automate engineering tasks such as debugging and code deployment
  • Screenshot of Cortex Memory

    Cortex Memory

    sopaco.github.io
    Good for
    Builders
    Category
    AI Agents
    Lets you
    Give AI agents memory that persists across sessions