RealTimeSTT 1.0.2__tar.gz → 1.1.0__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.
Files changed (87) hide show
  1. {realtimestt-1.0.2 → realtimestt-1.1.0}/MANIFEST.in +4 -0
  2. {realtimestt-1.0.2/realtimestt.egg-info → realtimestt-1.1.0}/PKG-INFO +115 -23
  3. {realtimestt-1.0.2 → realtimestt-1.1.0}/README.md +67 -16
  4. realtimestt-1.1.0/RELEASE_NOTES.md +254 -0
  5. realtimestt-1.1.0/RealtimeSTT/__init__.py +94 -0
  6. realtimestt-1.1.0/RealtimeSTT/assets/__init__.py +1 -0
  7. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/audio_recorder.py +170 -8
  8. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/audio_input_worker.py +119 -102
  9. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/initialization.py +314 -2
  10. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/lifecycle.py +82 -13
  11. realtimestt-1.1.0/RealtimeSTT/core/manual_audio_input.py +177 -0
  12. realtimestt-1.1.0/RealtimeSTT/core/preview_transcription.py +322 -0
  13. realtimestt-1.1.0/RealtimeSTT/core/realtime.py +1884 -0
  14. realtimestt-1.1.0/RealtimeSTT/core/realtime_merge.py +821 -0
  15. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/realtime_text_stabilizer.py +76 -0
  16. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/recorder_config.py +50 -0
  17. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/recording.py +141 -19
  18. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/recording_buffers.py +74 -0
  19. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/runtime.py +1 -1
  20. realtimestt-1.1.0/RealtimeSTT/core/shutdown.py +270 -0
  21. realtimestt-1.1.0/RealtimeSTT/core/tail_transcription.py +593 -0
  22. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/transcription.py +206 -13
  23. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/transcription_api.py +83 -18
  24. realtimestt-1.1.0/RealtimeSTT/engines/__init__.py +28 -0
  25. realtimestt-1.0.2/RealtimeSTT/transcription_engines/__init__.py → realtimestt-1.1.0/RealtimeSTT/engines/base_engine.py +4 -5
  26. realtimestt-1.1.0/RealtimeSTT/install_sherpa_models.py +674 -0
  27. realtimestt-1.1.0/RealtimeSTT/model_manifests.py +273 -0
  28. realtimestt-1.1.0/RealtimeSTT/transcription_engines/__init__.py +48 -0
  29. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/base.py +7 -1
  30. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/factory.py +11 -0
  31. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/faster_whisper_engine.py +36 -1
  32. realtimestt-1.1.0/RealtimeSTT/transcription_engines/funasr_engine.py +347 -0
  33. realtimestt-1.1.0/RealtimeSTT/transcription_engines/nemotron_engine.py +590 -0
  34. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/parakeet_engine.py +41 -4
  35. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/sherpa_onnx_engine.py +95 -9
  36. realtimestt-1.1.0/RealtimeSTT/transcription_engines/transcribe_cpp_engine.py +521 -0
  37. realtimestt-1.1.0/RealtimeSTT_server/PRODUCTION_SERVER.md +274 -0
  38. realtimestt-1.1.0/RealtimeSTT_server/production_server.py +5241 -0
  39. realtimestt-1.1.0/example_fastapi_server/__init__.py +1 -0
  40. realtimestt-1.1.0/example_fastapi_server/protocol.py +82 -0
  41. realtimestt-1.1.0/example_fastapi_server/server.py +4145 -0
  42. {realtimestt-1.0.2 → realtimestt-1.1.0/realtimestt.egg-info}/PKG-INFO +115 -23
  43. {realtimestt-1.0.2 → realtimestt-1.1.0}/realtimestt.egg-info/SOURCES.txt +19 -1
  44. {realtimestt-1.0.2 → realtimestt-1.1.0}/realtimestt.egg-info/entry_points.txt +2 -0
  45. {realtimestt-1.0.2 → realtimestt-1.1.0}/realtimestt.egg-info/requires.txt +43 -3
  46. {realtimestt-1.0.2 → realtimestt-1.1.0}/realtimestt.egg-info/top_level.txt +1 -0
  47. {realtimestt-1.0.2 → realtimestt-1.1.0}/requirements.txt +1 -0
  48. {realtimestt-1.0.2 → realtimestt-1.1.0}/setup.py +58 -6
  49. realtimestt-1.1.0/tests/test_preview_transcription.py +339 -0
  50. realtimestt-1.1.0/tests/test_tail_transcription.py +456 -0
  51. realtimestt-1.0.2/RELEASE_NOTES.md +0 -79
  52. realtimestt-1.0.2/RealtimeSTT/__init__.py +0 -44
  53. realtimestt-1.0.2/RealtimeSTT/core/manual_audio_input.py +0 -34
  54. realtimestt-1.0.2/RealtimeSTT/core/realtime.py +0 -974
  55. realtimestt-1.0.2/RealtimeSTT/core/shutdown.py +0 -69
  56. {realtimestt-1.0.2 → realtimestt-1.1.0}/LICENSE +0 -0
  57. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/assets/warmup_audio.wav +0 -0
  58. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/audio_input.py +0 -0
  59. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/audio_recorder_client.py +0 -0
  60. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/__init__.py +0 -0
  61. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/preroll.py +0 -0
  62. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/realtime_boundary_detector.py +0 -0
  63. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/realtime_callbacks.py +0 -0
  64. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/safepipe.py +0 -0
  65. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/silero_vad.py +0 -0
  66. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/state.py +0 -0
  67. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/text_formatting.py +0 -0
  68. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/voice_activity.py +0 -0
  69. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/core/wakeword.py +0 -0
  70. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/install_kroko.py +0 -0
  71. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/_model_utils.py +0 -0
  72. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/cohere_transcribe_engine.py +0 -0
  73. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/granite_speech_engine.py +0 -0
  74. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/hf_transformers_engines.py +0 -0
  75. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/kroko_onnx_engine.py +0 -0
  76. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/moonshine_engine.py +0 -0
  77. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/omnilingual_asr_engine.py +0 -0
  78. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/openai_api_engine.py +0 -0
  79. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/openai_whisper_engine.py +0 -0
  80. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/qwen3_asr_engine.py +0 -0
  81. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT/transcription_engines/whisper_cpp_engine.py +0 -0
  82. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT_server/__init__.py +0 -0
  83. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT_server/install_packages.py +0 -0
  84. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT_server/stt_cli_client.py +0 -0
  85. {realtimestt-1.0.2 → realtimestt-1.1.0}/RealtimeSTT_server/stt_server.py +0 -0
  86. {realtimestt-1.0.2 → realtimestt-1.1.0}/realtimestt.egg-info/dependency_links.txt +0 -0
  87. {realtimestt-1.0.2 → realtimestt-1.1.0}/setup.cfg +0 -0
@@ -4,11 +4,15 @@ include RELEASE_NOTES.md
4
4
  include LICENSE
5
5
  prune docs/development
6
6
  prune dev-log
7
+ prune dev-logs
7
8
  prune roadmap
8
9
  prune test-model-cache
9
10
  prune test-results
10
11
  prune docs_private
12
+ prune docs/handoffs
11
13
  prune tests_private
12
14
  global-exclude *Kopie*.py
13
15
  global-exclude *.bak
14
16
  global-exclude *.tmp
17
+ global-exclude *.log
18
+ global-exclude *.jsonl
@@ -1,18 +1,19 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: realtimestt
3
- Version: 1.0.2
3
+ Version: 1.1.0
4
4
  Summary: A fast Voice Activity Detection and Transcription System
5
- Home-page: https://github.com/KoljaB/RealTimeSTT
5
+ Home-page: https://github.com/KoljaB/RealtimeSTT
6
6
  Author: Kolja Beigel
7
7
  Author-email: kolja.beigel@web.de
8
8
  License: MIT
9
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
10
+ Requires-Python: >=3.11,<3.13
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
13
  Requires-Dist: PyAudio==0.2.14
14
14
  Requires-Dist: webrtcvad-wheels==2.0.14
15
15
  Requires-Dist: halo==0.0.31
16
+ Requires-Dist: colorama==0.4.6
16
17
  Requires-Dist: torch
17
18
  Requires-Dist: torchaudio
18
19
  Requires-Dist: scipy==1.17.1
@@ -26,12 +27,26 @@ Provides-Extra: whisper-cpp
26
27
  Requires-Dist: pywhispercpp; extra == "whisper-cpp"
27
28
  Provides-Extra: whispercpp
28
29
  Requires-Dist: pywhispercpp; extra == "whispercpp"
30
+ Provides-Extra: transcribe-cpp
31
+ Requires-Dist: transcribe-cpp==0.2.1; extra == "transcribe-cpp"
32
+ Provides-Extra: transcribecpp
33
+ Requires-Dist: transcribe-cpp==0.2.1; extra == "transcribecpp"
34
+ Provides-Extra: parakeet-transcribe-cpp
35
+ Requires-Dist: transcribe-cpp==0.2.1; extra == "parakeet-transcribe-cpp"
29
36
  Provides-Extra: openai-whisper
30
37
  Requires-Dist: openai-whisper; extra == "openai-whisper"
31
38
  Provides-Extra: sherpa-onnx
32
- Requires-Dist: sherpa-onnx; extra == "sherpa-onnx"
39
+ Requires-Dist: sherpa-onnx==1.13.4; extra == "sherpa-onnx"
33
40
  Provides-Extra: sherpa
34
- Requires-Dist: sherpa-onnx; extra == "sherpa"
41
+ Requires-Dist: sherpa-onnx==1.13.4; extra == "sherpa"
42
+ Provides-Extra: server
43
+ Requires-Dist: fastapi<1,>=0.115; extra == "server"
44
+ Requires-Dist: uvicorn[standard]<1,>=0.30; extra == "server"
45
+ Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "server"
46
+ Provides-Extra: production-server
47
+ Requires-Dist: fastapi<1,>=0.115; extra == "production-server"
48
+ Requires-Dist: uvicorn[standard]<1,>=0.30; extra == "production-server"
49
+ Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "production-server"
35
50
  Provides-Extra: silero-vad
36
51
  Requires-Dist: silero-vad>=6.2.1; python_version >= "3.8" and extra == "silero-vad"
37
52
  Provides-Extra: silero
@@ -76,6 +91,14 @@ Provides-Extra: qwen3-asr
76
91
  Requires-Dist: qwen-asr; extra == "qwen3-asr"
77
92
  Provides-Extra: qwen-vllm
78
93
  Requires-Dist: qwen-asr[vllm]; extra == "qwen-vllm"
94
+ Provides-Extra: funasr
95
+ Requires-Dist: funasr; extra == "funasr"
96
+ Provides-Extra: fun-asr
97
+ Requires-Dist: funasr; extra == "fun-asr"
98
+ Provides-Extra: fun-asr
99
+ Requires-Dist: funasr; extra == "fun-asr"
100
+ Provides-Extra: sensevoice
101
+ Requires-Dist: funasr; extra == "sensevoice"
79
102
  Provides-Extra: kroko-builder
80
103
  Requires-Dist: huggingface_hub; extra == "kroko-builder"
81
104
  Provides-Extra: porcupine
@@ -103,8 +126,11 @@ Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra ==
103
126
  Provides-Extra: all
104
127
  Requires-Dist: faster-whisper==1.2.1; extra == "all"
105
128
  Requires-Dist: pywhispercpp; extra == "all"
129
+ Requires-Dist: transcribe-cpp==0.2.1; extra == "all"
106
130
  Requires-Dist: openai-whisper; extra == "all"
107
- Requires-Dist: sherpa-onnx; extra == "all"
131
+ Requires-Dist: sherpa-onnx==1.13.4; extra == "all"
132
+ Requires-Dist: fastapi<1,>=0.115; extra == "all"
133
+ Requires-Dist: uvicorn[standard]<1,>=0.30; extra == "all"
108
134
  Requires-Dist: silero-vad[onnx-cpu]>=6.2.1; python_version >= "3.8" and extra == "all"
109
135
  Requires-Dist: transformers; extra == "all"
110
136
  Requires-Dist: nemo_toolkit[asr]; extra == "all"
@@ -112,6 +138,7 @@ Requires-Dist: torch==2.8.0; (python_version >= "3.10" and python_version < "3.1
112
138
  Requires-Dist: torchaudio==2.8.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "all"
113
139
  Requires-Dist: omnilingual-asr>=0.2.0; (python_version >= "3.10" and python_version < "3.12" and platform_system != "Windows") and extra == "all"
114
140
  Requires-Dist: qwen-asr; extra == "all"
141
+ Requires-Dist: funasr; extra == "all"
115
142
  Requires-Dist: huggingface_hub; extra == "all"
116
143
  Requires-Dist: pvporcupine==1.9.5; extra == "all"
117
144
  Requires-Dist: openwakeword>=0.6.0; extra == "all"
@@ -140,10 +167,16 @@ Main ASR backend only, without the faster packaged Silero ONNX Runtime VAD:
140
167
 
141
168
  pip install "realtimestt[faster-whisper]"
142
169
 
143
- Core package only, without a transcription engine or wake-word backend:
170
+ Base recorder/audio runtime, without a transcription engine or wake-word
171
+ backend:
144
172
 
145
173
  pip install realtimestt
146
174
 
175
+ The base install still includes microphone/audio support, WebRTC VAD, recorder
176
+ VAD logic, websocket client/server dependencies, and shared audio utilities. It
177
+ does not install `faster-whisper`, Porcupine, OpenWakeWord, or another optional
178
+ ASR/wake-word backend unless you request the matching extra.
179
+
147
180
  Install multiple extras by separating them with commas:
148
181
 
149
182
  pip install "realtimestt[faster-whisper,porcupine]"
@@ -153,8 +186,10 @@ Available extras include:
153
186
 
154
187
  - faster-whisper: default CTranslate2 Whisper backend
155
188
  - whisper-cpp: whisper.cpp backend through pywhispercpp
189
+ - transcribe-cpp: first-party transcribe.cpp Python binding; add the matching CUDA provider separately
156
190
  - openai-whisper: original OpenAI Whisper Python backend
157
191
  - sherpa-onnx: sherpa-onnx CPU backends
192
+ - server/production-server: versioned FastAPI HTTP and WebSocket ASR server
158
193
  - silero-vad: packaged Silero model assets and PyTorch wrapper
159
194
  - silero-onnx/silero-onnx-cpu: fastest Silero VAD CPU ONNX Runtime backend
160
195
  - silero-onnx-gpu: installs Silero's ONNX GPU runtime extra for experiments
@@ -164,6 +199,7 @@ Available extras include:
164
199
  - moonshine, granite, cohere: aliases for the Transformers dependency set
165
200
  - qwen: Qwen ASR backend
166
201
  - qwen-vllm: Qwen ASR with vLLM extras
202
+ - funasr: experimental FunASR/SenseVoice backend
167
203
  - kroko-builder: helper command for building/installing Kroko-ONNX plus Hugging Face model downloads
168
204
  - porcupine: Porcupine wake-word backend
169
205
  - openwakeword: OpenWakeWord wake-word backend
@@ -171,6 +207,11 @@ Available extras include:
171
207
  - recommended/default: faster-whisper backend plus fast Silero CPU ONNX VAD
172
208
  - all: all PyPI-installable optional backends
173
209
 
210
+ Install the pinned Nemotron live and Parakeet final model bundles into a
211
+ persistent verified cache:
212
+
213
+ stt-install-sherpa-models --root ./models/sherpa-onnx --model all
214
+
174
215
  WebRTC VAD is installed with the core package. AudioToTextRecorder also
175
216
  initializes a Silero VAD path. Install the recommended/default or
176
217
  silero-onnx-cpu extra for a self-contained local Silero ONNX Runtime backend.
@@ -220,8 +261,34 @@ wake words, and direct access to audio streams. It is designed for assistants,
220
261
  dictation tools, browser streaming servers, and prototypes that need to turn
221
262
  speech into text with only a few lines of code.
222
263
 
223
- The recommended default path uses `faster_whisper`. Other engines are available
224
- through install extras when their optional dependencies and models are present.
264
+ The general-purpose default path uses `faster_whisper`. Other engines are
265
+ available through install extras when their optional dependencies and models
266
+ are present.
267
+
268
+ ## Recommended Engine Profiles
269
+
270
+ - **CUDA / GPU:** Keep using the established `faster_whisper` CUDA setup. It
271
+ remains the recommended general-purpose GPU path.
272
+ - **CPU:** For production streaming on Linux x86-64, the strongly recommended
273
+ profile is
274
+ `sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-560ms-int8` for fast,
275
+ replaceable realtime text together with
276
+ `sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8` for the single authoritative
277
+ final transcript. Nemotron processes only new audio frames during the turn;
278
+ Parakeet then refines the complete turn once at finalization. This pairing
279
+ provides substantially better CPU streaming behavior than repeatedly
280
+ retranscribing a growing audio buffer while preserving a high-quality final.
281
+
282
+ Install the CPU server stack and both pinned model bundles with:
283
+
284
+ ```bash
285
+ python -m pip install "RealtimeSTT[server,sherpa-onnx]"
286
+ stt-install-sherpa-models --root ./models/sherpa-onnx --model all
287
+ ```
288
+
289
+ See the [production server guide](RealtimeSTT_server/PRODUCTION_SERVER.md) for
290
+ the authenticated HTTP/WebSocket deployment recipe and exact pinned model
291
+ directories.
225
292
 
226
293
  ### Support RealtimeSTT
227
294
 
@@ -260,7 +327,8 @@ See the [Kroko-ONNX engine guide](docs/engines/kroko-onnx.md),
260
327
 
261
328
  ## Install
262
329
 
263
- Use Python 3.11 or newer for the current pinned dependency set.
330
+ The current CI matrix covers Python 3.11 and 3.12. Python 3.13 and newer are
331
+ not release targets until dependency and CI gates are available.
264
332
 
265
333
  ```bash
266
334
  pip install "RealtimeSTT[faster-whisper]"
@@ -356,8 +424,10 @@ audio, logging, and executor injection.
356
424
  - Direct microphone input or application-fed audio chunks.
357
425
  - Event callbacks for recording, VAD, realtime text, transcription, and wake
358
426
  word state.
359
- - A FastAPI browser streaming server example with multi-user session isolation,
360
- shared inference resources, metrics, and health endpoints.
427
+ - A packaged production FastAPI server with versioned HTTP/WebSocket contracts,
428
+ session isolation, bounded shared inference resources, authentication, and
429
+ readiness/capabilities endpoints.
430
+ - A browser streaming reference app for source checkouts.
361
431
 
362
432
  ## Documentation
363
433
 
@@ -369,6 +439,8 @@ audio, logging, and executor injection.
369
439
  parameter reference.
370
440
  - [Transcription engines](docs/transcription-engines.md): engine selection and
371
441
  setup links.
442
+ - [Custom transcription engines](docs/custom-transcription-engines.md): public
443
+ base class, executor integration, streaming sessions, and contribution guide.
372
444
  - [Wake words](docs/wake-words.md): Porcupine and OpenWakeWord setup.
373
445
  - [External audio](docs/external-audio.md): feeding audio without a microphone.
374
446
  - [Testing](docs/testing.md): maintained unit and opt-in golden test workflow.
@@ -376,6 +448,8 @@ audio, logging, and executor injection.
376
448
  legacy experiments under `tests/`.
377
449
  - [FastAPI server](docs/fastapi-server.md): browser server configuration,
378
450
  protocol, metrics, and deployment notes.
451
+ - [Production server](RealtimeSTT_server/PRODUCTION_SERVER.md): packaged remote
452
+ HTTP/WebSocket API, authentication, limits, and deployment recipe.
379
453
  - [Troubleshooting](docs/troubleshooting.md): common install, audio, CUDA,
380
454
  model, dependency, and runtime errors.
381
455
  - [Engine licenses](docs/licenses.md): license notes for optional engine
@@ -393,24 +467,42 @@ Engine-specific references:
393
467
  - [Meta Omnilingual ASR](docs/engines/omnilingual-asr.md)
394
468
  - [Granite/Qwen Transformers engines](docs/engines/hf-transformers.md)
395
469
  - [Cohere Transcribe](docs/engines/cohere.md)
470
+ - [FunASR](docs/engines/funasr.md)
471
+
472
+ ## Production Server
396
473
 
397
- ## Server Example
474
+ The supported remote server is packaged as an optional install. It binds to
475
+ loopback by default and exposes versioned health, readiness, capabilities,
476
+ raw-PCM final transcription, and ordered streaming WebSocket endpoints.
477
+ Direct non-loopback binds require both a bearer token and Uvicorn TLS
478
+ certificate/key files; for a reverse-proxy deployment, keep the server on
479
+ loopback and terminate TLS at the proxy.
480
+
481
+ ```bash
482
+ python -m pip install "RealtimeSTT[server,faster-whisper]"
483
+ stt-server-production --host 127.0.0.1 --port 8010
484
+ ```
398
485
 
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.
486
+ For CPU INT8 deployment, the recommended pairing is
487
+ `sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-560ms-int8` for live hypotheses
488
+ and `sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8` for authoritative final
489
+ transcription. Install `RealtimeSTT[server,sherpa-onnx]` and both pinned model
490
+ bundles into persistent storage before following the server recipe. The
491
+ `server` extra includes the local Silero ONNX VAD runtime used by legacy
492
+ recorder-backed server paths. The versioned production WebSocket path owns its
493
+ turn state and does not derive finalization from recorder VAD, so production
494
+ startup does not need an interactive Torch Hub download:
403
495
 
404
496
  ```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
497
+ stt-install-sherpa-models --root ./models/sherpa-onnx --model all
407
498
  ```
408
499
 
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.
500
+ See
501
+ [PRODUCTION_SERVER.md](RealtimeSTT_server/PRODUCTION_SERVER.md).
411
502
 
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.
503
+ The interactive browser reference app remains in `example_fastapi_server` for
504
+ source checkouts. See [docs/fastapi-server.md](docs/fastapi-server.md) for its
505
+ UI, engine recipes, protocol details, and metrics.
414
506
 
415
507
  ## Contributing
416
508
 
@@ -6,8 +6,34 @@ wake words, and direct access to audio streams. It is designed for assistants,
6
6
  dictation tools, browser streaming servers, and prototypes that need to turn
7
7
  speech into text with only a few lines of code.
8
8
 
9
- The recommended default path uses `faster_whisper`. Other engines are available
10
- through install extras when their optional dependencies and models are present.
9
+ The general-purpose default path uses `faster_whisper`. Other engines are
10
+ available through install extras when their optional dependencies and models
11
+ are present.
12
+
13
+ ## Recommended Engine Profiles
14
+
15
+ - **CUDA / GPU:** Keep using the established `faster_whisper` CUDA setup. It
16
+ remains the recommended general-purpose GPU path.
17
+ - **CPU:** For production streaming on Linux x86-64, the strongly recommended
18
+ profile is
19
+ `sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-560ms-int8` for fast,
20
+ replaceable realtime text together with
21
+ `sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8` for the single authoritative
22
+ final transcript. Nemotron processes only new audio frames during the turn;
23
+ Parakeet then refines the complete turn once at finalization. This pairing
24
+ provides substantially better CPU streaming behavior than repeatedly
25
+ retranscribing a growing audio buffer while preserving a high-quality final.
26
+
27
+ Install the CPU server stack and both pinned model bundles with:
28
+
29
+ ```bash
30
+ python -m pip install "RealtimeSTT[server,sherpa-onnx]"
31
+ stt-install-sherpa-models --root ./models/sherpa-onnx --model all
32
+ ```
33
+
34
+ See the [production server guide](RealtimeSTT_server/PRODUCTION_SERVER.md) for
35
+ the authenticated HTTP/WebSocket deployment recipe and exact pinned model
36
+ directories.
11
37
 
12
38
  ### Support RealtimeSTT
13
39
 
@@ -46,7 +72,8 @@ See the [Kroko-ONNX engine guide](docs/engines/kroko-onnx.md),
46
72
 
47
73
  ## Install
48
74
 
49
- Use Python 3.11 or newer for the current pinned dependency set.
75
+ The current CI matrix covers Python 3.11 and 3.12. Python 3.13 and newer are
76
+ not release targets until dependency and CI gates are available.
50
77
 
51
78
  ```bash
52
79
  pip install "RealtimeSTT[faster-whisper]"
@@ -142,8 +169,10 @@ audio, logging, and executor injection.
142
169
  - Direct microphone input or application-fed audio chunks.
143
170
  - Event callbacks for recording, VAD, realtime text, transcription, and wake
144
171
  word state.
145
- - A FastAPI browser streaming server example with multi-user session isolation,
146
- shared inference resources, metrics, and health endpoints.
172
+ - A packaged production FastAPI server with versioned HTTP/WebSocket contracts,
173
+ session isolation, bounded shared inference resources, authentication, and
174
+ readiness/capabilities endpoints.
175
+ - A browser streaming reference app for source checkouts.
147
176
 
148
177
  ## Documentation
149
178
 
@@ -155,6 +184,8 @@ audio, logging, and executor injection.
155
184
  parameter reference.
156
185
  - [Transcription engines](docs/transcription-engines.md): engine selection and
157
186
  setup links.
187
+ - [Custom transcription engines](docs/custom-transcription-engines.md): public
188
+ base class, executor integration, streaming sessions, and contribution guide.
158
189
  - [Wake words](docs/wake-words.md): Porcupine and OpenWakeWord setup.
159
190
  - [External audio](docs/external-audio.md): feeding audio without a microphone.
160
191
  - [Testing](docs/testing.md): maintained unit and opt-in golden test workflow.
@@ -162,6 +193,8 @@ audio, logging, and executor injection.
162
193
  legacy experiments under `tests/`.
163
194
  - [FastAPI server](docs/fastapi-server.md): browser server configuration,
164
195
  protocol, metrics, and deployment notes.
196
+ - [Production server](RealtimeSTT_server/PRODUCTION_SERVER.md): packaged remote
197
+ HTTP/WebSocket API, authentication, limits, and deployment recipe.
165
198
  - [Troubleshooting](docs/troubleshooting.md): common install, audio, CUDA,
166
199
  model, dependency, and runtime errors.
167
200
  - [Engine licenses](docs/licenses.md): license notes for optional engine
@@ -179,24 +212,42 @@ Engine-specific references:
179
212
  - [Meta Omnilingual ASR](docs/engines/omnilingual-asr.md)
180
213
  - [Granite/Qwen Transformers engines](docs/engines/hf-transformers.md)
181
214
  - [Cohere Transcribe](docs/engines/cohere.md)
215
+ - [FunASR](docs/engines/funasr.md)
182
216
 
183
- ## Server Example
217
+ ## Production Server
218
+
219
+ The supported remote server is packaged as an optional install. It binds to
220
+ loopback by default and exposes versioned health, readiness, capabilities,
221
+ raw-PCM final transcription, and ordered streaming WebSocket endpoints.
222
+ Direct non-loopback binds require both a bearer token and Uvicorn TLS
223
+ certificate/key files; for a reverse-proxy deployment, keep the server on
224
+ loopback and terminate TLS at the proxy.
225
+
226
+ ```bash
227
+ python -m pip install "RealtimeSTT[server,faster-whisper]"
228
+ stt-server-production --host 127.0.0.1 --port 8010
229
+ ```
184
230
 
185
- The browser FastAPI reference server lives in `example_fastapi_server` and is
186
- intended for source checkouts. It is not installed by the PyPI wheel; keeping it
187
- source-only keeps the wheel lean and avoids adding web-server dependencies for
188
- users who only need the recorder/API library.
231
+ For CPU INT8 deployment, the recommended pairing is
232
+ `sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-560ms-int8` for live hypotheses
233
+ and `sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8` for authoritative final
234
+ transcription. Install `RealtimeSTT[server,sherpa-onnx]` and both pinned model
235
+ bundles into persistent storage before following the server recipe. The
236
+ `server` extra includes the local Silero ONNX VAD runtime used by legacy
237
+ recorder-backed server paths. The versioned production WebSocket path owns its
238
+ turn state and does not derive finalization from recorder VAD, so production
239
+ startup does not need an interactive Torch Hub download:
189
240
 
190
241
  ```bash
191
- python -m pip install -r example_fastapi_server/requirements.txt
192
- python example_fastapi_server/server.py --host 0.0.0.0 --port 8010
242
+ stt-install-sherpa-models --root ./models/sherpa-onnx --model all
193
243
  ```
194
244
 
195
- For pip-only installs, use the Python recorder/API examples instead. If you
196
- want the FastAPI reference server, clone the repository or install from Git.
245
+ See
246
+ [PRODUCTION_SERVER.md](RealtimeSTT_server/PRODUCTION_SERVER.md).
197
247
 
198
- Open `http://localhost:8010`. See [docs/fastapi-server.md](docs/fastapi-server.md)
199
- for engine recipes, websocket protocol details, health checks, and metrics.
248
+ The interactive browser reference app remains in `example_fastapi_server` for
249
+ source checkouts. See [docs/fastapi-server.md](docs/fastapi-server.md) for its
250
+ UI, engine recipes, protocol details, and metrics.
200
251
 
201
252
  ## Contributing
202
253
 
@@ -0,0 +1,254 @@
1
+ # Release Notes
2
+
3
+ ## 1.1.0 - 2026-08-27
4
+
5
+ This stable release promotes the externally validated `1.1.0rc1` candidate.
6
+ See [the release-readiness checklist](docs/release-1.1.0-readiness.md) for the
7
+ required evidence gates and supported platform boundaries.
8
+
9
+ ### Added
10
+
11
+ - Added correlated Preview `resume` handling for the versioned production
12
+ WebSocket API, including an ordered acknowledgement barrier and explicit
13
+ candidate/audio provenance fields.
14
+ - Added an opt-in authenticated late full-turn correction operation for
15
+ Preview-only deployments, bounded by a configurable maximum audio duration.
16
+ - Added recorder Preview/tail transcription support with package-level result
17
+ types and the documented dual-realtime merge contracts.
18
+
19
+ ### Changed
20
+
21
+ - Preview-only production turns retain the complete logical-turn audio for model
22
+ input; live text remains diagnostic and is never substituted for Preview or
23
+ Final output.
24
+ - Empty Preview results use one bounded silence-padding retry, while Final
25
+ remains authoritative whenever Final ASR is enabled.
26
+ - Preview admission is now bounded and coalesced: one native dispatch lane
27
+ retains only the latest pending snapshot while an older inference is active.
28
+ - Unexpected live-lane exits now produce structured, observable degraded events
29
+ while preserving the authoritative-final fallback path.
30
+ - Raw-PCM responses propagate provider-reported language and finite language
31
+ probability metadata when the selected provider supplies it.
32
+ - Realtime punctuation splitting commits the frame boundary atomically, and the
33
+ local Preview worker rejects new speculative requests once its bounded queue
34
+ is full.
35
+ - Release packaging checks now validate the requested version, inspect archive
36
+ names/content for private material, and install both wheel and sdist from
37
+ outside the source checkout.
38
+
39
+ ### Release boundaries
40
+
41
+ - The documented Nemotron-live/Parakeet-final profile targets Linux x86-64 with
42
+ the pinned sherpa-onnx runtime. Native Windows remains a development target
43
+ for this pair; use another authoritative final engine there unless the
44
+ cumulative-recovery behavior is independently validated.
45
+ - Model weights remain external artifacts. Users must review and accept the
46
+ exact model/runtime licenses before downloading or redistributing them.
47
+ - The final source tree must pass supported CI, Linux real-model acceptance,
48
+ and isolated wheel and sdist installation before stable publication.
49
+ - `1.1.0` supersedes the `1.1.0rc1` prerelease; stable installations should pin
50
+ `RealtimeSTT==1.1.0` when an exact version is required.
51
+
52
+ ## 1.0.4 - 2026-08-21
53
+
54
+ ### Fixed
55
+
56
+ - Replaced the production WebSocket recorder/VAD-derived final path with a
57
+ turn-owned state machine and authoritative canonical PCM buffer. Every
58
+ finalized turn now produces exactly one Parakeet final result followed by
59
+ exactly one completion.
60
+ - Made accepted 16 kHz PCM invariant to 10/20/40/64/100 ms packet boundaries;
61
+ the WebSocket final uses the same final scheduler lane, audio normalization,
62
+ language, and prompt policy as raw-PCM HTTP transcription.
63
+ - Fenced late live/final/transport callbacks across cancel, reset, disconnect,
64
+ and reconnect, including reconnects that reuse a session or turn id.
65
+ - Fixed live Nemotron input scaling, removed growing full-buffer snapshots,
66
+ fed only new frames to one stream per logical turn, and deduplicated and
67
+ rate-limited changed partials.
68
+ - Closed long-session lifecycle leaks by retiring completed final threads,
69
+ draining cancelled live queues, cancelling timed-out live streams, pruning
70
+ connection epochs, and resolving queued scheduler jobs during shutdown.
71
+ - Moved native live-stream creation and cancellation off the ASGI event loop,
72
+ fenced streams returned after a turn was retired, and bounded concurrent
73
+ native cancellation work process-wide.
74
+ - Made final/completion admission atomic across reset and cancel, scoped final
75
+ timeout cancellation to the exact scheduler request, and bounded live
76
+ backpressure by queued audio duration instead of client packet count.
77
+ - Bounded terminal-event reserve for slow WebSocket readers and close the
78
+ connection with code 1013 instead of allowing finalized turns to grow an
79
+ unbounded outbound queue.
80
+ - Removed bearer-token command-line flags; production tokens now come only
81
+ from `REALTIMESTT_SERVER_BEARER_TOKEN` so they cannot appear in process
82
+ listings or shell history.
83
+
84
+ ### Changed
85
+
86
+ - Production WebSocket audio is explicitly canonical mono 16 kHz
87
+ `pcm_s16le`. HTTP final transcription retains its documented supported input
88
+ sample rates and performs one whole-request resample.
89
+ - Streaming benchmark pacing now uses the absolute audio clock and validates
90
+ exact terminal counts, terminal/completion ordering, quiet completion tails,
91
+ long-run repetitions, and bounded parallel concurrency.
92
+ - HTTP A/B and WebSocket benchmark reports redact endpoints, corpus paths,
93
+ clip identifiers, references, partials, and finals by default. Sensitive
94
+ per-record output requires an explicit protected-local opt-in.
95
+ - The production CPU profile keeps Nemotron live hypotheses display-only;
96
+ Parakeet remains the sole authoritative turn final.
97
+
98
+ ### Notes
99
+
100
+ - This release supersedes the old TestPyPI `1.0.3` artifact. PyPI
101
+ files are immutable, so the corrected production release uses version `1.0.4`.
102
+ - The supported Nemotron/Parakeet production profile remains Linux x86-64.
103
+ Keep the server on loopback behind an authenticated TLS/WSS endpoint and
104
+ retain a local-live/final-server rollback path during client rollout.
105
+ - No production-PyPI publication is implied by this release candidate.
106
+
107
+ ## 1.0.3 - 2026-08-20
108
+
109
+ ### Added
110
+
111
+ - Added the experimental optional FunASR/SenseVoice transcription backend and
112
+ install extra.
113
+ - Added `AudioToTextRecorder.feed_audio_file()` for feeding audio files through
114
+ the manual audio input path.
115
+ - Added `TranscriptionResult.metadata` support and word timestamp plumbing for
116
+ backends that can return word-level timing.
117
+ - Added public custom transcription engine interfaces through
118
+ `RealtimeSTT.engines`, including `BaseEngine`, `TranscriptionEngineConfig`,
119
+ `TranscriptionResult`, and `StreamingTranscriptionSession`.
120
+ - Added custom engine documentation showing `transcription_executor`,
121
+ `realtime_transcription_executor`, and streaming-session integration.
122
+ - Added opt-in realtime punctuation splitting through
123
+ `realtime_punctuation_split_marks`. The default remains `"off"`; `"sentence"`
124
+ is the supported production mode for `.`, `?`, and `!`.
125
+ - Added the multilingual sherpa-onnx Nemotron 3.5 0.6B INT8 engine as a true
126
+ streaming engine with per-stream language selection, incremental frame
127
+ ingestion, final draining, reset, cancellation, and deterministic release.
128
+ - Added pinned manifests for the exact Nemotron streaming and Parakeet v3 final
129
+ model archives, including source, license, archive integrity, and extracted
130
+ file integrity metadata.
131
+ - Added `stt-install-sherpa-models` for resumable, verified, atomic installation
132
+ and offline reuse of those pinned model archives in persistent storage.
133
+ - Added a packaged production FastAPI server with versioned liveness,
134
+ readiness, capabilities, raw PCM16 final transcription, and ordered remote
135
+ streaming WebSocket APIs. Non-loopback binds require bearer authentication
136
+ and TLS. The server includes bounded queues and sessions, backpressure,
137
+ limits, structured errors, warmup, and graceful resource cleanup.
138
+ - Added a reproducible same-host A/B benchmark harness for the raw PCM16 client
139
+ contract and release CI for unit, distribution, and isolated wheel
140
+ installation checks.
141
+
142
+ ### Changed
143
+
144
+ - Hardened realtime punctuation splitting with repeated-observation checks,
145
+ timestamp validation, guarded dash handling, and synchronized split-state
146
+ bookkeeping.
147
+ - Expanded install-extra validation to include the FunASR extra and the `all`
148
+ extra.
149
+ - Exposed the same engine authoring interfaces through lazy top-level package
150
+ imports while keeping existing `BaseTranscriptionEngine` imports compatible.
151
+ - Pinned the sherpa-onnx optional dependency to the release-tested version and
152
+ hardened empty-output/language handling for Parakeet final transcription.
153
+ - Made the production `server` extra install a local Silero ONNX VAD runtime,
154
+ avoiding interactive Torch Hub model retrieval when WebSocket sessions start.
155
+ - Promoted the remote production server to the `stt-server-production` packaged
156
+ entry point while preserving the legacy `stt-server` command.
157
+
158
+ ### Notes
159
+
160
+ - Comma, dash, ellipsis, and `all` punctuation split modes remain available for
161
+ experiments but are not promoted as production-supported in this release.
162
+ - Realtime punctuation splitting requires word timestamps. Built-in support is
163
+ currently wired through `faster_whisper`; other built-in engines skip the
164
+ split path.
165
+ - The production CPU pair uses Nemotron only for replaceable live hypotheses;
166
+ Parakeet transcribes the authoritative final audio once and replaces the live
167
+ hypothesis at turn completion.
168
+ - The exact model weights remain external artifacts governed by their own
169
+ licenses. The package ships manifests and installation tooling, not weights.
170
+ - The pinned two-model production profile targets Linux x86-64. Native Windows
171
+ remains suitable for development, but Parakeet can return empty output for
172
+ some voiced cumulative-turn audio; use the Linux server or another final
173
+ engine until that runtime combination is proven reliable.
174
+ - On the same Linux CPU host and final model, the 1.0.3 server matched the
175
+ reference WER/CER/exact result, was at single-client latency parity, and at
176
+ four concurrent clients improved throughput by 7.5% and p95 latency by 33.2%.
177
+
178
+ ## 1.0.2 - 2026-05-31
179
+
180
+ ### Changed
181
+
182
+ - Split the `AudioToTextRecorder` implementation behind the existing public
183
+ facade into focused core modules for lifecycle, recording, realtime
184
+ transcription, voice activity, wake-word handling, initialization, shutdown,
185
+ and formatting.
186
+ - Refreshed recorder architecture and compatibility documentation so the public
187
+ facade, threading boundaries, and regression checks are easier to audit.
188
+ - Normalized package docstrings and comments to use block-style summaries and
189
+ focused runtime explanations.
190
+
191
+ ### Removed
192
+
193
+ - Removed an unused internal console color helper from `audio_recorder.py`.
194
+
195
+ ## 1.0.1 - 2026-05-20
196
+
197
+ ### Added
198
+
199
+ - Added a generic streaming transcription session interface so engines can
200
+ opt in to incremental realtime decoding while existing engines keep the
201
+ full-buffer fallback behavior.
202
+ - Added `kroko_onnx` transcription engine for Kroko/Banafo `.data` streaming
203
+ models.
204
+ - Added Kroko realtime preview support that feeds streaming engines only newly
205
+ recorded audio frames through a persistent session.
206
+ - Added `stt-install-kroko`, exposed through the `kroko-builder` extra, to help
207
+ build and install Kroko-ONNX for the active Python environment.
208
+ - Added focused Kroko and realtime streaming unit coverage plus a public manual
209
+ `tests/realtimestt_kroko_test.py` smoke script.
210
+ - Added `omnilingual_asr` transcription engine for Meta
211
+ Omnilingual ASR on Linux/WSL2 with Python 3.11.x, with support for the
212
+ published CTC and LLM model cards. Native Windows is not supported because
213
+ `fairseq2n` has no Windows wheel; Python 3.12.x is blocked by upstream
214
+ `omnilingual-asr` package metadata.
215
+ - Added `docs/licenses.md` with engine and model-family license notes.
216
+
217
+ ### Changed
218
+
219
+ - Kroko Community models with known public filenames can be auto-downloaded
220
+ into the RealtimeSTT cache when `auto_download_model` is enabled.
221
+ - Kroko final transcription remains one-shot. The new streaming path is used
222
+ for realtime previews only when the realtime engine advertises streaming
223
+ support.
224
+ - Kroko model cadence is used to choose automatic finalization tail padding.
225
+ - Omnilingual ASR uses `omniASR_CTC_1B_v2` as the default when the
226
+ recorder is still configured with a Whisper default model name.
227
+ - Omnilingual in-memory audio is passed to the backend as predecoded waveform
228
+ dictionaries to avoid the upstream package treating raw float arrays as
229
+ encoded audio bytes.
230
+
231
+ ### Notes
232
+
233
+ - Install/build Kroko-ONNX separately with
234
+ `pip install "RealtimeSTT[kroko-builder,silero-onnx-cpu]"` followed by
235
+ `stt-install-kroko --build`, or install a compatible Kroko-ONNX wheel in the
236
+ same Python environment. The `silero-onnx-cpu` extra provides the local VAD
237
+ backend used by recorder-based Kroko smoke tests and live microphone use.
238
+ - Licensed Pro models require a Pro-capable Kroko wheel and a key supplied at
239
+ runtime through configuration, CLI, or environment variables. Do not commit
240
+ keys, Pro models, generated logs, local wheels, or local cache contents.
241
+ - `Pro-16-L` is the recommended realtime model for the fastest partials. Local
242
+ private validation observed the expected low-latency partial behavior, but
243
+ exact cadence depends on runtime, provider, hardware, and scheduling.
244
+ - `suppress_native_output=True` redirects Kroko native stdout/stderr during
245
+ recognizer calls and sets `KROKO_ONNX_SUPPRESS_LICENSE_OUTPUT=1`. Reliable
246
+ suppression of asynchronous Pro license refresh messages requires a Kroko
247
+ wheel rebuilt with RealtimeSTT's native quiet-output patch; older Kroko wheels
248
+ may still print background license status text.
249
+ - Omnilingual ASR support is optional and Linux/WSL2 Python 3.11.x-oriented.
250
+ Native Windows installs are not supported by the upstream dependency stack at
251
+ this time, and Python 3.12.x cannot resolve the current upstream package.
252
+ - `omniASR_CTC_1B_v2` is the recommended Omnilingual starting point for local
253
+ realtime tests in this release. Smaller/larger CTC and LLM models are exposed
254
+ through model-card plumbing but require their own quality and memory checks.