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[recommended]"

Main ASR backend only, without the faster packaged Silero ONNX Runtime VAD:

pip install "realtimestt[faster-whisper]"

Base recorder/audio runtime, without a transcription engine or wake-word backend:

pip install realtimestt

The base install still includes microphone/audio support, WebRTC VAD, recorder VAD logic, websocket client/server dependencies, and shared audio utilities. It does not install faster-whisper, Porcupine, OpenWakeWord, or another optional ASR/wake-word backend unless you request the matching extra.

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
  • transcribe-cpp: first-party transcribe.cpp Python binding; add the matching CUDA provider separately
  • openai-whisper: original OpenAI Whisper Python backend
  • sherpa-onnx: sherpa-onnx CPU backends
  • server/production-server: versioned FastAPI HTTP and WebSocket ASR server
  • silero-vad: packaged Silero model assets and PyTorch wrapper
  • silero-onnx/silero-onnx-cpu: fastest Silero VAD CPU ONNX Runtime backend
  • silero-onnx-gpu: installs Silero's ONNX GPU runtime extra for experiments
  • parakeet: NVIDIA NeMo Parakeet backend
  • omnilingual/omnilingual-asr: Meta Omnilingual ASR backend for Linux/WSL2 with Python 3.11.x only; uses omnilingual-asr>=0.2.0 with matching torch/torchaudio builds
  • 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
  • funasr: experimental FunASR/SenseVoice backend
  • kroko-builder: helper command for building/installing Kroko-ONNX plus Hugging Face model downloads
  • porcupine: Porcupine wake-word backend
  • openwakeword: OpenWakeWord wake-word backend
  • wakewords: both wake-word backends
  • recommended/default: faster-whisper backend plus fast Silero CPU ONNX VAD
  • all: all PyPI-installable optional backends

Install the pinned Nemotron live and Parakeet final model bundles into a persistent verified cache:

stt-install-sherpa-models --root ./models/sherpa-onnx --model all

WebRTC VAD is installed with the core package. AudioToTextRecorder also initializes a Silero VAD path. Install the recommended/default or silero-onnx-cpu extra for a self-contained local Silero ONNX Runtime backend.

Meta Omnilingual ASR install note: use Linux or WSL2 with Python 3.11.x. Native Windows cannot run the Omnilingual runtime because fairseq2n has no Windows wheel, and Python 3.12.x currently cannot resolve omnilingual-asr>=0.2.0 from PyPI because the upstream package metadata excludes normal 3.12 patch releases.

For live Kroko-ONNX usage, install the builder helper and then build Kroko in the same Python environment:

pip install "realtimestt[kroko-builder,silero-onnx-cpu]"
stt-install-kroko --build

The silero-onnx-cpu extra is not needed to build Kroko-ONNX itself, but recorder-based Kroko smoke tests and live AudioToTextRecorder use need a local VAD backend.

On Windows, use Python 3.12 x64 and start Docker Desktop before running the builder. Check that Docker's Linux engine is available with:

python --version
git --version
docker version

docker version must show a Server section. docker --version only checks that the Docker CLI is installed.

If the default builder cache is not writable, use a project-local work directory:

stt-install-kroko --build --work-dir .\kroko-builder-work

The kroko-builder extra includes huggingface_hub. Download a public Community model after the builder finishes:

mkdir test-model-cache\kroko-onnx
python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='Banafo/Kroko-ASR', filename='Kroko-EN-Community-64-L-Streaming-001.data', local_dir='test-model-cache/kroko-onnx')"

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 general-purpose default path uses faster_whisper. Other engines are available through install extras when their optional dependencies and models are present.

Recommended Engine Profiles

  • CUDA / GPU: Keep using the established faster_whisper CUDA setup. It remains the recommended general-purpose GPU path.
  • CPU: For production streaming on Linux x86-64, the strongly recommended profile is sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-560ms-int8 for fast, replaceable realtime text together with sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8 for the single authoritative final transcript. Nemotron processes only new audio frames during the turn; Parakeet then refines the complete turn once at finalization. This pairing provides substantially better CPU streaming behavior than repeatedly retranscribing a growing audio buffer while preserving a high-quality final.

Install the CPU server stack and both pinned model bundles with:

python -m pip install "RealtimeSTT[server,sherpa-onnx]"
stt-install-sherpa-models --root ./models/sherpa-onnx --model all

See the production server guide for the authenticated HTTP/WebSocket deployment recipe and exact pinned model directories.

Support RealtimeSTT

If RealtimeSTT saved you time, one GitHub star is a simple way to help make it more stable.

Stars improve visibility and visibility brings more users, more real-world testing, more bug reports, more fixes, and better releases for everyone.

Demo

https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5

CLI demo code (reproduces the video above)

Featured Integration: Kroko/Banafo ASR

RealtimeSTT includes native support for kroko_onnx, the local streaming ASR engine from the Kroko/Banafo team.

This integration has been on my wishlist for a long time. Kroko is a strong fit for RealtimeSTT's goals: fast, accurate local speech recognition.

Start with the public Community models for local testing, or see Kroko/Banafo's commercial model options if you need production licensing and higher-end models.

pip install "RealtimeSTT[kroko-builder,silero-onnx-cpu]"
stt-install-kroko --build

The silero-onnx-cpu extra gives AudioToTextRecorder a local VAD backend for recorder-based smoke tests and live microphone use.

See the Kroko-ONNX engine guide, Kroko ASR docs, and kroko-onnx on GitHub.

Install

The current CI matrix covers Python 3.11 and 3.12. Python 3.13 and newer are not release targets until dependency and CI gates are available.

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 packaged production FastAPI server with versioned HTTP/WebSocket contracts, session isolation, bounded shared inference resources, authentication, and readiness/capabilities endpoints.
  • A browser streaming reference app for source checkouts.

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.
  • Custom transcription engines: public base class, executor integration, streaming sessions, and contribution guide.
  • 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.
  • Production server: packaged remote HTTP/WebSocket API, authentication, limits, and deployment recipe.
  • Troubleshooting: common install, audio, CUDA, model, dependency, and runtime errors.
  • Engine licenses: license notes for optional engine runtimes and model families.

Engine-specific references:

Production Server

The supported remote server is packaged as an optional install. It binds to loopback by default and exposes versioned health, readiness, capabilities, raw-PCM final transcription, and ordered streaming WebSocket endpoints. Direct non-loopback binds require both a bearer token and Uvicorn TLS certificate/key files; for a reverse-proxy deployment, keep the server on loopback and terminate TLS at the proxy.

python -m pip install "RealtimeSTT[server,faster-whisper]"
stt-server-production --host 127.0.0.1 --port 8010

For CPU INT8 deployment, the recommended pairing is sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-560ms-int8 for live hypotheses and sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8 for authoritative final transcription. Install RealtimeSTT[server,sherpa-onnx] and both pinned model bundles into persistent storage before following the server recipe. The server extra includes the local Silero ONNX VAD runtime used by legacy recorder-backed server paths. The versioned production WebSocket path owns its turn state and does not derive finalization from recorder VAD, so production startup does not need an interactive Torch Hub download:

stt-install-sherpa-models --root ./models/sherpa-onnx --model all

See PRODUCTION_SERVER.md.

The interactive browser reference app remains in example_fastapi_server for source checkouts. See docs/fastapi-server.md for its UI, engine recipes, protocol details, 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

realtimestt-1.1.2.tar.gz (350.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

realtimestt-1.1.2-py3-none-any.whl (357.8 kB view details)

Uploaded Python 3

File details

Details for the file realtimestt-1.1.2.tar.gz.

File metadata

  • Download URL: realtimestt-1.1.2.tar.gz
  • Upload date:
  • Size: 350.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for realtimestt-1.1.2.tar.gz
Algorithm Hash digest
SHA256 d75aceeafeed8a7098f233855c7707390057c0e5ae16b8addf633df3a0da8540
MD5 3ce6de3fa3cb1d7c5d919ba0b9267377
BLAKE2b-256 221a097bb31a587655ada8431b5439f057b7b6f1ce465ff9c43b9047dbf02dd3

See more details on using hashes here.

File details

Details for the file realtimestt-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: realtimestt-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 357.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for realtimestt-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e97ac14600b276463090d9e72d61f9da280bf8e48d5e336167014978642ea533
MD5 6ff3a891cd45fd08445eac3a12383fb6
BLAKE2b-256 d54172f63e9c6c62ef6d626bad12add39dd2ce992dac85289a9907d67a05174f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.4

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.3.104

2 files

0.3.103

2 files

0.3.102

2 files

0.3.101

2 files

0.3.100

2 files

0.3.99

2 files

0.3.98

1 file

0.3.97

3 files

0.3.96

2 files

0.3.95

2 files

0.3.94

2 files

0.3.93

2 files

0.3.92

2 files

0.3.91

2 files

0.3.81

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.42

2 files

0.2.41

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.28

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

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