RealTimeSTT 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {realtimestt-1.0.0 → realtimestt-1.0.2}/MANIFEST.in +14 -13
- realtimestt-1.0.2/PKG-INFO +426 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/README.md +212 -165
- realtimestt-1.0.2/RELEASE_NOTES.md +79 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/__init__.py +44 -36
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/audio_input.py +43 -21
- realtimestt-1.0.2/RealtimeSTT/audio_recorder.py +781 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/audio_recorder_client.py +128 -22
- realtimestt-1.0.2/RealtimeSTT/core/__init__.py +3 -0
- realtimestt-1.0.2/RealtimeSTT/core/audio_input_worker.py +342 -0
- realtimestt-1.0.2/RealtimeSTT/core/initialization.py +646 -0
- realtimestt-1.0.2/RealtimeSTT/core/lifecycle.py +254 -0
- realtimestt-1.0.2/RealtimeSTT/core/manual_audio_input.py +34 -0
- realtimestt-1.0.2/RealtimeSTT/core/preroll.py +434 -0
- realtimestt-1.0.2/RealtimeSTT/core/realtime.py +974 -0
- {realtimestt-1.0.0/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/core}/realtime_boundary_detector.py +559 -491
- realtimestt-1.0.2/RealtimeSTT/core/realtime_callbacks.py +23 -0
- {realtimestt-1.0.0/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/core}/realtime_text_stabilizer.py +1060 -891
- realtimestt-1.0.2/RealtimeSTT/core/recorder_config.py +195 -0
- realtimestt-1.0.2/RealtimeSTT/core/recording.py +465 -0
- realtimestt-1.0.2/RealtimeSTT/core/recording_buffers.py +139 -0
- realtimestt-1.0.2/RealtimeSTT/core/runtime.py +56 -0
- {realtimestt-1.0.0/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/core}/safepipe.py +26 -31
- realtimestt-1.0.2/RealtimeSTT/core/shutdown.py +69 -0
- realtimestt-1.0.2/RealtimeSTT/core/silero_vad.py +591 -0
- realtimestt-1.0.2/RealtimeSTT/core/state.py +86 -0
- realtimestt-1.0.2/RealtimeSTT/core/text_formatting.py +72 -0
- realtimestt-1.0.2/RealtimeSTT/core/transcription.py +242 -0
- realtimestt-1.0.2/RealtimeSTT/core/transcription_api.py +142 -0
- realtimestt-1.0.2/RealtimeSTT/core/voice_activity.py +409 -0
- realtimestt-1.0.2/RealtimeSTT/core/wakeword.py +223 -0
- realtimestt-1.0.2/RealtimeSTT/install_kroko.py +700 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/__init__.py +26 -20
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/_model_utils.py +110 -82
- realtimestt-1.0.2/RealtimeSTT/transcription_engines/base.py +166 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/cohere_transcribe_engine.py +39 -24
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/factory.py +68 -51
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/faster_whisper_engine.py +79 -62
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/granite_speech_engine.py +39 -24
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/hf_transformers_engines.py +465 -380
- realtimestt-1.0.2/RealtimeSTT/transcription_engines/kroko_onnx_engine.py +813 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/moonshine_engine.py +45 -30
- realtimestt-1.0.2/RealtimeSTT/transcription_engines/omnilingual_asr_engine.py +481 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/openai_api_engine.py +29 -15
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/openai_whisper_engine.py +120 -93
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/parakeet_engine.py +153 -117
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/qwen3_asr_engine.py +164 -128
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/sherpa_onnx_engine.py +392 -302
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/whisper_cpp_engine.py +113 -86
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT_server/stt_cli_client.py +5 -3
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT_server/stt_server.py +9 -2
- realtimestt-1.0.2/realtimestt.egg-info/PKG-INFO +426 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/realtimestt.egg-info/SOURCES.txt +27 -4
- {realtimestt-1.0.0 → realtimestt-1.0.2}/realtimestt.egg-info/entry_points.txt +1 -0
- realtimestt-1.0.2/realtimestt.egg-info/requires.txt +170 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/requirements.txt +2 -1
- {realtimestt-1.0.0 → realtimestt-1.0.2}/setup.py +271 -186
- realtimestt-1.0.0/PKG-INFO +0 -241
- realtimestt-1.0.0/RealtimeSTT/audio_recorder.py +0 -3848
- realtimestt-1.0.0/RealtimeSTT/transcription_engines/base.py +0 -70
- realtimestt-1.0.0/RealtimeSTT/transcription_engines/kroko_onnx_engine.py +0 -296
- realtimestt-1.0.0/realtimestt.egg-info/PKG-INFO +0 -241
- realtimestt-1.0.0/realtimestt.egg-info/requires.txt +0 -96
- {realtimestt-1.0.0 → realtimestt-1.0.2}/LICENSE +0 -0
- {realtimestt-1.0.0/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/assets}/warmup_audio.wav +0 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT_server/__init__.py +0 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/RealtimeSTT_server/install_packages.py +0 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/realtimestt.egg-info/dependency_links.txt +0 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/realtimestt.egg-info/top_level.txt +0 -0
- {realtimestt-1.0.0 → realtimestt-1.0.2}/setup.cfg +0 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
include requirements.txt
|
|
2
|
-
include README.md
|
|
3
|
-
include
|
|
4
|
-
|
|
5
|
-
prune
|
|
6
|
-
prune
|
|
7
|
-
prune
|
|
8
|
-
prune test-
|
|
9
|
-
prune
|
|
10
|
-
prune
|
|
11
|
-
|
|
12
|
-
global-exclude *.
|
|
13
|
-
global-exclude *.
|
|
1
|
+
include requirements.txt
|
|
2
|
+
include README.md
|
|
3
|
+
include RELEASE_NOTES.md
|
|
4
|
+
include LICENSE
|
|
5
|
+
prune docs/development
|
|
6
|
+
prune dev-log
|
|
7
|
+
prune roadmap
|
|
8
|
+
prune test-model-cache
|
|
9
|
+
prune test-results
|
|
10
|
+
prune docs_private
|
|
11
|
+
prune tests_private
|
|
12
|
+
global-exclude *Kopie*.py
|
|
13
|
+
global-exclude *.bak
|
|
14
|
+
global-exclude *.tmp
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: realtimestt
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: A fast Voice Activity Detection and Transcription System
|
|
5
|
+
Home-page: https://github.com/KoljaB/RealTimeSTT
|
|
6
|
+
Author: Kolja Beigel
|
|
7
|
+
Author-email: kolja.beigel@web.de
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: real-time,audio,transcription,speech-to-text,voice-activity-detection,VAD,real-time-transcription,ambient-noise-detection,microphone-input,faster_whisper,speech-recognition,voice-assistants,audio-processing,buffered-transcription,pyaudio,ambient-noise-level,voice-deactivity
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: PyAudio==0.2.14
|
|
14
|
+
Requires-Dist: webrtcvad-wheels==2.0.14
|
|
15
|
+
Requires-Dist: halo==0.0.31
|
|
16
|
+
Requires-Dist: torch
|
|
17
|
+
Requires-Dist: torchaudio
|
|
18
|
+
Requires-Dist: scipy==1.17.1
|
|
19
|
+
Requires-Dist: websockets==16.0
|
|
20
|
+
Requires-Dist: websocket-client==1.9.0
|
|
21
|
+
Requires-Dist: soundfile==0.13.1
|
|
22
|
+
Provides-Extra: minimal
|
|
23
|
+
Provides-Extra: faster-whisper
|
|
24
|
+
Requires-Dist: faster-whisper==1.2.1; extra == "faster-whisper"
|
|
25
|
+
Provides-Extra: whisper-cpp
|
|
26
|
+
Requires-Dist: pywhispercpp; extra == "whisper-cpp"
|
|
27
|
+
Provides-Extra: whispercpp
|
|
28
|
+
Requires-Dist: pywhispercpp; extra == "whispercpp"
|
|
29
|
+
Provides-Extra: openai-whisper
|
|
30
|
+
Requires-Dist: openai-whisper; extra == "openai-whisper"
|
|
31
|
+
Provides-Extra: sherpa-onnx
|
|
32
|
+
Requires-Dist: sherpa-onnx; extra == "sherpa-onnx"
|
|
33
|
+
Provides-Extra: sherpa
|
|
34
|
+
Requires-Dist: sherpa-onnx; extra == "sherpa"
|
|
35
|
+
Provides-Extra: silero-vad
|
|
36
|
+
Requires-Dist: silero-vad>=6.2.1; python_version >= "3.8" and extra == "silero-vad"
|
|
37
|
+
Provides-Extra: silero
|
|
38
|
+
Requires-Dist: silero-vad>=6.2.1; python_version >= "3.8" and extra == "silero"
|
|
39
|
+
Provides-Extra: silero-onnx
|
|
40
|
+
Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "silero-onnx"
|
|
41
|
+
Provides-Extra: silero-onnx-cpu
|
|
42
|
+
Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "silero-onnx-cpu"
|
|
43
|
+
Provides-Extra: vad-onnx
|
|
44
|
+
Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "vad-onnx"
|
|
45
|
+
Provides-Extra: silero-onnx-gpu
|
|
46
|
+
Requires-Dist: silero-vad[onnx-gpu]>=6.2.1; python_version >= "3.8" and extra == "silero-onnx-gpu"
|
|
47
|
+
Provides-Extra: vad-onnx-gpu
|
|
48
|
+
Requires-Dist: silero-vad[onnx-gpu]>=6.2.1; python_version >= "3.8" and extra == "vad-onnx-gpu"
|
|
49
|
+
Provides-Extra: transformers
|
|
50
|
+
Requires-Dist: transformers; extra == "transformers"
|
|
51
|
+
Provides-Extra: moonshine
|
|
52
|
+
Requires-Dist: transformers; extra == "moonshine"
|
|
53
|
+
Provides-Extra: granite
|
|
54
|
+
Requires-Dist: transformers; extra == "granite"
|
|
55
|
+
Provides-Extra: cohere
|
|
56
|
+
Requires-Dist: transformers; extra == "cohere"
|
|
57
|
+
Provides-Extra: parakeet
|
|
58
|
+
Requires-Dist: nemo_toolkit[asr]; extra == "parakeet"
|
|
59
|
+
Provides-Extra: nvidia-parakeet
|
|
60
|
+
Requires-Dist: nemo_toolkit[asr]; extra == "nvidia-parakeet"
|
|
61
|
+
Provides-Extra: omnilingual-asr
|
|
62
|
+
Requires-Dist: torch==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "omnilingual-asr"
|
|
63
|
+
Requires-Dist: torchaudio==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "omnilingual-asr"
|
|
64
|
+
Requires-Dist: omnilingual-asr>=0.2.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "omnilingual-asr"
|
|
65
|
+
Provides-Extra: omnilingual
|
|
66
|
+
Requires-Dist: torch==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "omnilingual"
|
|
67
|
+
Requires-Dist: torchaudio==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "omnilingual"
|
|
68
|
+
Requires-Dist: omnilingual-asr>=0.2.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "omnilingual"
|
|
69
|
+
Provides-Extra: meta-omnilingual-asr
|
|
70
|
+
Requires-Dist: torch==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "meta-omnilingual-asr"
|
|
71
|
+
Requires-Dist: torchaudio==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "meta-omnilingual-asr"
|
|
72
|
+
Requires-Dist: omnilingual-asr>=0.2.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "meta-omnilingual-asr"
|
|
73
|
+
Provides-Extra: qwen
|
|
74
|
+
Requires-Dist: qwen-asr; extra == "qwen"
|
|
75
|
+
Provides-Extra: qwen3-asr
|
|
76
|
+
Requires-Dist: qwen-asr; extra == "qwen3-asr"
|
|
77
|
+
Provides-Extra: qwen-vllm
|
|
78
|
+
Requires-Dist: qwen-asr[vllm]; extra == "qwen-vllm"
|
|
79
|
+
Provides-Extra: kroko-builder
|
|
80
|
+
Requires-Dist: huggingface_hub; extra == "kroko-builder"
|
|
81
|
+
Provides-Extra: porcupine
|
|
82
|
+
Requires-Dist: pvporcupine==1.9.5; extra == "porcupine"
|
|
83
|
+
Provides-Extra: pvporcupine
|
|
84
|
+
Requires-Dist: pvporcupine==1.9.5; extra == "pvporcupine"
|
|
85
|
+
Provides-Extra: pvp
|
|
86
|
+
Requires-Dist: pvporcupine==1.9.5; extra == "pvp"
|
|
87
|
+
Provides-Extra: openwakeword
|
|
88
|
+
Requires-Dist: openwakeword>=0.6.0; extra == "openwakeword"
|
|
89
|
+
Provides-Extra: oww
|
|
90
|
+
Requires-Dist: openwakeword>=0.6.0; extra == "oww"
|
|
91
|
+
Provides-Extra: wakewords
|
|
92
|
+
Requires-Dist: pvporcupine==1.9.5; extra == "wakewords"
|
|
93
|
+
Requires-Dist: openwakeword>=0.6.0; extra == "wakewords"
|
|
94
|
+
Provides-Extra: wake-words
|
|
95
|
+
Requires-Dist: pvporcupine==1.9.5; extra == "wake-words"
|
|
96
|
+
Requires-Dist: openwakeword>=0.6.0; extra == "wake-words"
|
|
97
|
+
Provides-Extra: recommended
|
|
98
|
+
Requires-Dist: faster-whisper==1.2.1; extra == "recommended"
|
|
99
|
+
Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "recommended"
|
|
100
|
+
Provides-Extra: default
|
|
101
|
+
Requires-Dist: faster-whisper==1.2.1; extra == "default"
|
|
102
|
+
Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "default"
|
|
103
|
+
Provides-Extra: all
|
|
104
|
+
Requires-Dist: faster-whisper==1.2.1; extra == "all"
|
|
105
|
+
Requires-Dist: pywhispercpp; extra == "all"
|
|
106
|
+
Requires-Dist: openai-whisper; extra == "all"
|
|
107
|
+
Requires-Dist: sherpa-onnx; extra == "all"
|
|
108
|
+
Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "all"
|
|
109
|
+
Requires-Dist: transformers; extra == "all"
|
|
110
|
+
Requires-Dist: nemo_toolkit[asr]; extra == "all"
|
|
111
|
+
Requires-Dist: torch==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "all"
|
|
112
|
+
Requires-Dist: torchaudio==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "all"
|
|
113
|
+
Requires-Dist: omnilingual-asr>=0.2.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "all"
|
|
114
|
+
Requires-Dist: qwen-asr; extra == "all"
|
|
115
|
+
Requires-Dist: huggingface_hub; extra == "all"
|
|
116
|
+
Requires-Dist: pvporcupine==1.9.5; extra == "all"
|
|
117
|
+
Requires-Dist: openwakeword>=0.6.0; extra == "all"
|
|
118
|
+
Dynamic: author
|
|
119
|
+
Dynamic: author-email
|
|
120
|
+
Dynamic: description
|
|
121
|
+
Dynamic: description-content-type
|
|
122
|
+
Dynamic: home-page
|
|
123
|
+
Dynamic: keywords
|
|
124
|
+
Dynamic: license
|
|
125
|
+
Dynamic: license-file
|
|
126
|
+
Dynamic: provides-extra
|
|
127
|
+
Dynamic: requires-dist
|
|
128
|
+
Dynamic: requires-python
|
|
129
|
+
Dynamic: summary
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
RealtimeSTT lets you choose the transcription and wake-word dependencies you
|
|
133
|
+
want to install.
|
|
134
|
+
|
|
135
|
+
Recommended default local Whisper install:
|
|
136
|
+
|
|
137
|
+
pip install "realtimestt[recommended]"
|
|
138
|
+
|
|
139
|
+
Main ASR backend only, without the faster packaged Silero ONNX Runtime VAD:
|
|
140
|
+
|
|
141
|
+
pip install "realtimestt[faster-whisper]"
|
|
142
|
+
|
|
143
|
+
Core package only, without a transcription engine or wake-word backend:
|
|
144
|
+
|
|
145
|
+
pip install realtimestt
|
|
146
|
+
|
|
147
|
+
Install multiple extras by separating them with commas:
|
|
148
|
+
|
|
149
|
+
pip install "realtimestt[faster-whisper,porcupine]"
|
|
150
|
+
pip install "realtimestt[whisper-cpp,openwakeword]"
|
|
151
|
+
|
|
152
|
+
Available extras include:
|
|
153
|
+
|
|
154
|
+
- faster-whisper: default CTranslate2 Whisper backend
|
|
155
|
+
- whisper-cpp: whisper.cpp backend through pywhispercpp
|
|
156
|
+
- openai-whisper: original OpenAI Whisper Python backend
|
|
157
|
+
- sherpa-onnx: sherpa-onnx CPU backends
|
|
158
|
+
- silero-vad: packaged Silero model assets and PyTorch wrapper
|
|
159
|
+
- silero-onnx/silero-onnx-cpu: fastest Silero VAD CPU ONNX Runtime backend
|
|
160
|
+
- silero-onnx-gpu: installs Silero's ONNX GPU runtime extra for experiments
|
|
161
|
+
- parakeet: NVIDIA NeMo Parakeet backend
|
|
162
|
+
- 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
|
|
163
|
+
- transformers: shared Transformers dependency for Moonshine, Granite, and Cohere
|
|
164
|
+
- moonshine, granite, cohere: aliases for the Transformers dependency set
|
|
165
|
+
- qwen: Qwen ASR backend
|
|
166
|
+
- qwen-vllm: Qwen ASR with vLLM extras
|
|
167
|
+
- kroko-builder: helper command for building/installing Kroko-ONNX plus Hugging Face model downloads
|
|
168
|
+
- porcupine: Porcupine wake-word backend
|
|
169
|
+
- openwakeword: OpenWakeWord wake-word backend
|
|
170
|
+
- wakewords: both wake-word backends
|
|
171
|
+
- recommended/default: faster-whisper backend plus fast Silero CPU ONNX VAD
|
|
172
|
+
- all: all PyPI-installable optional backends
|
|
173
|
+
|
|
174
|
+
WebRTC VAD is installed with the core package. AudioToTextRecorder also
|
|
175
|
+
initializes a Silero VAD path. Install the recommended/default or
|
|
176
|
+
silero-onnx-cpu extra for a self-contained local Silero ONNX Runtime backend.
|
|
177
|
+
|
|
178
|
+
Meta Omnilingual ASR install note: use Linux or WSL2 with Python 3.11.x.
|
|
179
|
+
Native Windows cannot run the Omnilingual runtime because fairseq2n has no
|
|
180
|
+
Windows wheel, and Python 3.12.x currently cannot resolve omnilingual-asr>=0.2.0
|
|
181
|
+
from PyPI because the upstream package metadata excludes normal 3.12 patch
|
|
182
|
+
releases.
|
|
183
|
+
|
|
184
|
+
For live Kroko-ONNX usage, install the builder helper and then build Kroko in
|
|
185
|
+
the same Python environment:
|
|
186
|
+
|
|
187
|
+
pip install "realtimestt[kroko-builder,silero-onnx-cpu]"
|
|
188
|
+
stt-install-kroko --build
|
|
189
|
+
|
|
190
|
+
The silero-onnx-cpu extra is not needed to build Kroko-ONNX itself, but
|
|
191
|
+
recorder-based Kroko smoke tests and live AudioToTextRecorder use need a local
|
|
192
|
+
VAD backend.
|
|
193
|
+
|
|
194
|
+
On Windows, use Python 3.12 x64 and start Docker Desktop before running the
|
|
195
|
+
builder. Check that Docker's Linux engine is available with:
|
|
196
|
+
|
|
197
|
+
python --version
|
|
198
|
+
git --version
|
|
199
|
+
docker version
|
|
200
|
+
|
|
201
|
+
`docker version` must show a Server section. `docker --version` only checks
|
|
202
|
+
that the Docker CLI is installed.
|
|
203
|
+
|
|
204
|
+
If the default builder cache is not writable, use a project-local work
|
|
205
|
+
directory:
|
|
206
|
+
|
|
207
|
+
stt-install-kroko --build --work-dir .\kroko-builder-work
|
|
208
|
+
|
|
209
|
+
The kroko-builder extra includes huggingface_hub. Download a public Community
|
|
210
|
+
model after the builder finishes:
|
|
211
|
+
|
|
212
|
+
mkdir test-model-cache\kroko-onnx
|
|
213
|
+
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')"
|
|
214
|
+
|
|
215
|
+
# RealtimeSTT
|
|
216
|
+
|
|
217
|
+
RealtimeSTT is a Python speech-to-text library for applications that need
|
|
218
|
+
voice activity detection, fast transcription, optional realtime text updates,
|
|
219
|
+
wake words, and direct access to audio streams. It is designed for assistants,
|
|
220
|
+
dictation tools, browser streaming servers, and prototypes that need to turn
|
|
221
|
+
speech into text with only a few lines of code.
|
|
222
|
+
|
|
223
|
+
The recommended default path uses `faster_whisper`. Other engines are available
|
|
224
|
+
through install extras when their optional dependencies and models are present.
|
|
225
|
+
|
|
226
|
+
### Support RealtimeSTT
|
|
227
|
+
|
|
228
|
+
If RealtimeSTT saved you time, one GitHub star is a simple way to help make it more stable.
|
|
229
|
+
|
|
230
|
+
Stars improve visibility and visibility brings more users, more real-world testing, more bug reports, more fixes, and better releases for everyone.
|
|
231
|
+
|
|
232
|
+
## Demo
|
|
233
|
+
|
|
234
|
+
https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
|
|
235
|
+
|
|
236
|
+
[CLI demo code (reproduces the video above)](tests/realtimestt_test.py)
|
|
237
|
+
|
|
238
|
+
## Featured Integration: Kroko/Banafo ASR
|
|
239
|
+
|
|
240
|
+
RealtimeSTT includes native support for `kroko_onnx`, the local streaming ASR
|
|
241
|
+
engine from the Kroko/Banafo team.
|
|
242
|
+
|
|
243
|
+
This integration has been on my wishlist for a long time. Kroko is a strong fit
|
|
244
|
+
for RealtimeSTT's goals: fast, accurate local speech recognition.
|
|
245
|
+
|
|
246
|
+
Start with the public Community models for local testing, or see Kroko/Banafo's
|
|
247
|
+
commercial model options if you need production licensing and higher-end models.
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
pip install "RealtimeSTT[kroko-builder,silero-onnx-cpu]"
|
|
251
|
+
stt-install-kroko --build
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
The `silero-onnx-cpu` extra gives `AudioToTextRecorder` a local VAD backend for
|
|
255
|
+
recorder-based smoke tests and live microphone use.
|
|
256
|
+
|
|
257
|
+
See the [Kroko-ONNX engine guide](docs/engines/kroko-onnx.md),
|
|
258
|
+
[Kroko ASR docs](https://docs.kroko.ai/on-premise/), and
|
|
259
|
+
[kroko-onnx on GitHub](https://github.com/kroko-ai/kroko-onnx).
|
|
260
|
+
|
|
261
|
+
## Install
|
|
262
|
+
|
|
263
|
+
Use Python 3.11 or newer for the current pinned dependency set.
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
pip install "RealtimeSTT[faster-whisper]"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
On Linux, install PortAudio headers before installing the package:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
sudo apt-get update
|
|
273
|
+
sudo apt-get install python3-dev portaudio19-dev
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
On macOS:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
brew install portaudio
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
For CUDA, platform notes, and optional engine stacks, see
|
|
283
|
+
[docs/installation.md](docs/installation.md).
|
|
284
|
+
|
|
285
|
+
## Microphone Example
|
|
286
|
+
|
|
287
|
+
This waits for speech, stops after the detected utterance, and prints the final
|
|
288
|
+
transcript:
|
|
289
|
+
|
|
290
|
+
```python
|
|
291
|
+
from RealtimeSTT import AudioToTextRecorder
|
|
292
|
+
|
|
293
|
+
if __name__ == "__main__":
|
|
294
|
+
with AudioToTextRecorder() as recorder:
|
|
295
|
+
print("Speak now")
|
|
296
|
+
print(recorder.text())
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Use the `if __name__ == "__main__":` guard when running scripts, especially on
|
|
300
|
+
Windows, because RealtimeSTT uses multiprocessing for model work.
|
|
301
|
+
|
|
302
|
+
## Automatic Recording Loop
|
|
303
|
+
|
|
304
|
+
For continuous dictation, pass a callback to `text()` so transcription work can
|
|
305
|
+
complete asynchronously while your loop keeps listening:
|
|
306
|
+
|
|
307
|
+
```python
|
|
308
|
+
from RealtimeSTT import AudioToTextRecorder
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
def process_text(text):
|
|
312
|
+
print(text)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
if __name__ == "__main__":
|
|
316
|
+
recorder = AudioToTextRecorder()
|
|
317
|
+
|
|
318
|
+
while True:
|
|
319
|
+
recorder.text(process_text)
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
## External Audio
|
|
323
|
+
|
|
324
|
+
Set `use_microphone=False` when audio comes from a file, stream, websocket, or
|
|
325
|
+
another process. Feed 16-bit mono PCM chunks at 16 kHz, or pass the original
|
|
326
|
+
sample rate so RealtimeSTT can resample:
|
|
327
|
+
|
|
328
|
+
```python
|
|
329
|
+
from RealtimeSTT import AudioToTextRecorder
|
|
330
|
+
|
|
331
|
+
if __name__ == "__main__":
|
|
332
|
+
recorder = AudioToTextRecorder(use_microphone=False)
|
|
333
|
+
|
|
334
|
+
with open("audio_chunk.pcm", "rb") as audio_file:
|
|
335
|
+
recorder.feed_audio(audio_file.read(), original_sample_rate=16000)
|
|
336
|
+
|
|
337
|
+
print(recorder.text())
|
|
338
|
+
recorder.shutdown()
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
More examples are in [docs/quick-start.md](docs/quick-start.md) and
|
|
342
|
+
[docs/external-audio.md](docs/external-audio.md).
|
|
343
|
+
|
|
344
|
+
## Configuration Reference
|
|
345
|
+
|
|
346
|
+
Every `AudioToTextRecorder` constructor parameter is documented in
|
|
347
|
+
[docs/configuration.md](docs/configuration.md), including model/engine
|
|
348
|
+
selection, realtime transcription, VAD timing, wake words, callbacks, external
|
|
349
|
+
audio, logging, and executor injection.
|
|
350
|
+
|
|
351
|
+
## Features
|
|
352
|
+
|
|
353
|
+
- Voice activity detection with WebRTC VAD and Silero VAD.
|
|
354
|
+
- Final and realtime transcription with selectable engines.
|
|
355
|
+
- Optional wake word activation through Porcupine or OpenWakeWord.
|
|
356
|
+
- Direct microphone input or application-fed audio chunks.
|
|
357
|
+
- Event callbacks for recording, VAD, realtime text, transcription, and wake
|
|
358
|
+
word state.
|
|
359
|
+
- A FastAPI browser streaming server example with multi-user session isolation,
|
|
360
|
+
shared inference resources, metrics, and health endpoints.
|
|
361
|
+
|
|
362
|
+
## Documentation
|
|
363
|
+
|
|
364
|
+
- [Quick start](docs/quick-start.md): shortest demos and common recording
|
|
365
|
+
patterns.
|
|
366
|
+
- [Installation](docs/installation.md): platform setup, CUDA notes, and optional
|
|
367
|
+
dependencies.
|
|
368
|
+
- [Configuration](docs/configuration.md): complete `AudioToTextRecorder`
|
|
369
|
+
parameter reference.
|
|
370
|
+
- [Transcription engines](docs/transcription-engines.md): engine selection and
|
|
371
|
+
setup links.
|
|
372
|
+
- [Wake words](docs/wake-words.md): Porcupine and OpenWakeWord setup.
|
|
373
|
+
- [External audio](docs/external-audio.md): feeding audio without a microphone.
|
|
374
|
+
- [Testing](docs/testing.md): maintained unit and opt-in golden test workflow.
|
|
375
|
+
- [Test scripts](docs/test-scripts.md): demos, manual tests, regressions, and
|
|
376
|
+
legacy experiments under `tests/`.
|
|
377
|
+
- [FastAPI server](docs/fastapi-server.md): browser server configuration,
|
|
378
|
+
protocol, metrics, and deployment notes.
|
|
379
|
+
- [Troubleshooting](docs/troubleshooting.md): common install, audio, CUDA,
|
|
380
|
+
model, dependency, and runtime errors.
|
|
381
|
+
- [Engine licenses](docs/licenses.md): license notes for optional engine
|
|
382
|
+
runtimes and model families.
|
|
383
|
+
|
|
384
|
+
Engine-specific references:
|
|
385
|
+
|
|
386
|
+
- [faster-whisper](docs/engines/faster-whisper.md)
|
|
387
|
+
- [whisper.cpp](docs/engines/whisper-cpp.md)
|
|
388
|
+
- [OpenAI Whisper](docs/engines/openai-whisper.md)
|
|
389
|
+
- [Moonshine](docs/engines/moonshine.md)
|
|
390
|
+
- [sherpa-onnx](docs/engines/sherpa-onnx.md)
|
|
391
|
+
- [Kroko-ONNX](docs/engines/kroko-onnx.md)
|
|
392
|
+
- [Parakeet NeMo](docs/engines/parakeet-nemo.md)
|
|
393
|
+
- [Meta Omnilingual ASR](docs/engines/omnilingual-asr.md)
|
|
394
|
+
- [Granite/Qwen Transformers engines](docs/engines/hf-transformers.md)
|
|
395
|
+
- [Cohere Transcribe](docs/engines/cohere.md)
|
|
396
|
+
|
|
397
|
+
## Server Example
|
|
398
|
+
|
|
399
|
+
The browser FastAPI reference server lives in `example_fastapi_server` and is
|
|
400
|
+
intended for source checkouts. It is not installed by the PyPI wheel; keeping it
|
|
401
|
+
source-only keeps the wheel lean and avoids adding web-server dependencies for
|
|
402
|
+
users who only need the recorder/API library.
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
python -m pip install -r example_fastapi_server/requirements.txt
|
|
406
|
+
python example_fastapi_server/server.py --host 0.0.0.0 --port 8010
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
For pip-only installs, use the Python recorder/API examples instead. If you
|
|
410
|
+
want the FastAPI reference server, clone the repository or install from Git.
|
|
411
|
+
|
|
412
|
+
Open `http://localhost:8010`. See [docs/fastapi-server.md](docs/fastapi-server.md)
|
|
413
|
+
for engine recipes, websocket protocol details, health checks, and metrics.
|
|
414
|
+
|
|
415
|
+
## Contributing
|
|
416
|
+
|
|
417
|
+
Focused tests and small changes are easiest to review. The project keeps fast
|
|
418
|
+
unit tests separate from opt-in real-model tests; see [docs/testing.md](docs/testing.md).
|
|
419
|
+
|
|
420
|
+
## License
|
|
421
|
+
|
|
422
|
+
MIT
|
|
423
|
+
|
|
424
|
+
## Author
|
|
425
|
+
|
|
426
|
+
Kolja Beigel
|