Skip to main content

RealtimeSTT lets you choose the transcription and wake-word dependencies you want to install.

Recommended default local Whisper install:

pip install "realtimestt[faster-whisper]"

Core package only, without a transcription engine or wake-word backend:

pip install realtimestt

Install multiple extras by separating them with commas:

pip install "realtimestt[faster-whisper,porcupine]"
pip install "realtimestt[whisper-cpp,openwakeword]"

Available extras include:

  • faster-whisper: default CTranslate2 Whisper backend
  • whisper-cpp: whisper.cpp backend through pywhispercpp
  • openai-whisper: original OpenAI Whisper Python backend
  • sherpa-onnx: sherpa-onnx CPU backends
  • parakeet: NVIDIA NeMo Parakeet backend
  • transformers: shared Transformers dependency for Moonshine, Granite, and Cohere
  • moonshine, granite, cohere: aliases for the Transformers dependency set
  • qwen: Qwen ASR backend
  • qwen-vllm: Qwen ASR with vLLM extras
  • porcupine: Porcupine wake-word backend
  • openwakeword: OpenWakeWord wake-word backend
  • wakewords: both wake-word backends
  • recommended/default: faster-whisper backend
  • all: all PyPI-installable optional backends

The WebRTC VAD and Silero VAD dependencies are still part of the core install because AudioToTextRecorder currently initializes both VAD paths.

RealtimeSTT

RealtimeSTT is a Python speech-to-text library for applications that need voice activity detection, fast transcription, optional realtime text updates, wake words, and direct access to audio streams. It is designed for assistants, dictation tools, browser streaming servers, and prototypes that need to turn speech into text with only a few lines of code.

The recommended default path uses faster_whisper. Other engines are available through install extras when their optional dependencies and models are present.

Install

pip install "RealtimeSTT[faster-whisper]"

On Linux, install PortAudio headers before installing the package:

sudo apt-get update
sudo apt-get install python3-dev portaudio19-dev

On macOS:

brew install portaudio

For CUDA, platform notes, and optional engine stacks, see docs/installation.md.

Microphone Example

This waits for speech, stops after the detected utterance, and prints the final transcript:

from RealtimeSTT import AudioToTextRecorder

if __name__ == "__main__":
    with AudioToTextRecorder() as recorder:
        print("Speak now")
        print(recorder.text())

Use the if __name__ == "__main__": guard when running scripts, especially on Windows, because RealtimeSTT uses multiprocessing for model work.

Automatic Recording Loop

For continuous dictation, pass a callback to text() so transcription work can complete asynchronously while your loop keeps listening:

from RealtimeSTT import AudioToTextRecorder


def process_text(text):
    print(text)


if __name__ == "__main__":
    recorder = AudioToTextRecorder()

    while True:
        recorder.text(process_text)

External Audio

Set use_microphone=False when audio comes from a file, stream, websocket, or another process. Feed 16-bit mono PCM chunks at 16 kHz, or pass the original sample rate so RealtimeSTT can resample:

from RealtimeSTT import AudioToTextRecorder

if __name__ == "__main__":
    recorder = AudioToTextRecorder(use_microphone=False)

    with open("audio_chunk.pcm", "rb") as audio_file:
        recorder.feed_audio(audio_file.read(), original_sample_rate=16000)

    print(recorder.text())
    recorder.shutdown()

More examples are in docs/quick-start.md and docs/external-audio.md.

Configuration Reference

Every AudioToTextRecorder constructor parameter is documented in docs/configuration.md, including model/engine selection, realtime transcription, VAD timing, wake words, callbacks, external audio, logging, and executor injection.

Features

  • Voice activity detection with WebRTC VAD and Silero VAD.
  • Final and realtime transcription with selectable engines.
  • Optional wake word activation through Porcupine or OpenWakeWord.
  • Direct microphone input or application-fed audio chunks.
  • Event callbacks for recording, VAD, realtime text, transcription, and wake word state.
  • A FastAPI browser streaming server example with multi-user session isolation, shared inference resources, metrics, and health endpoints.

Documentation

  • Quick start: shortest demos and common recording patterns.
  • Installation: platform setup, CUDA notes, and optional dependencies.
  • Configuration: complete AudioToTextRecorder parameter reference.
  • Transcription engines: engine selection and setup links.
  • Wake words: Porcupine and OpenWakeWord setup.
  • External audio: feeding audio without a microphone.
  • Testing: maintained unit and opt-in golden test workflow.
  • Test scripts: demos, manual tests, regressions, and legacy experiments under tests/.
  • FastAPI server: browser server configuration, protocol, metrics, and deployment notes.
  • Troubleshooting: common install, audio, CUDA, model, dependency, and runtime errors.

Engine-specific references:

Server Example

The browser server lives in example_fastapi_server:

python -m pip install -r example_fastapi_server/requirements.txt
python example_fastapi_server/server.py --host 0.0.0.0 --port 8010

Open http://localhost:8010. See docs/fastapi-server.md for engine recipes, websocket protocol details, health checks, and metrics.

Contributing

Focused tests and small changes are easiest to review. The project keeps fast unit tests separate from opt-in real-model tests; see docs/testing.md.

License

MIT

Author

Kolja Beigel

Metadata

Release files for realtimestt 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for realtimestt 1.0.0
File Size Uploaded Provenance Actions
realtimestt-1.0.0.tar.gz 136.2 kB Without provenance Details for realtimestt-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for realtimestt 1.0.0
File Interpreter ABI Platform Actions
realtimestt-1.0.0-py3-none-any.whl Python 3 none any Details for realtimestt-1.0.0-py3-none-any.whl

Total release size: 278.5 kB

Release files / realtimestt-1.0.0.tar.gz

Download URL realtimestt-1.0.0.tar.gz
Size 136.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a7e254169f0f7ca1b1f71b96e88f30269e61bc45ec3fd86fcf5b9ca57618d2f7
BLAKE2b-256 checksum
How to use checksums
ee1ba721b4111734598d6636b4277352e43dea225e664cf9a6ad5fd21ba98743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / realtimestt-1.0.0-py3-none-any.whl

Download URL realtimestt-1.0.0-py3-none-any.whl
Size 142.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d69f8a30149e3e714b2ab7ccdd6208354e90cd1bf7d8f3fc76eb6e0da4aecea2
BLAKE2b-256 checksum
How to use checksums
1d3835b7502508b28d856403570fdcefdd6dc909203f712fb29d518b706618b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Security for realtimestt 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page