RealTimeSTT 1.0.1__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.1/realtimestt.egg-info → realtimestt-1.0.2}/PKG-INFO +8 -2
- {realtimestt-1.0.1 → realtimestt-1.0.2}/README.md +7 -1
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RELEASE_NOTES.md +17 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/__init__.py +11 -3
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/audio_input.py +43 -21
- realtimestt-1.0.2/RealtimeSTT/audio_recorder.py +781 -0
- {realtimestt-1.0.1 → 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.1/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/core}/preroll.py +73 -13
- realtimestt-1.0.2/RealtimeSTT/core/realtime.py +974 -0
- {realtimestt-1.0.1/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/core}/realtime_boundary_detector.py +80 -12
- realtimestt-1.0.2/RealtimeSTT/core/realtime_callbacks.py +23 -0
- {realtimestt-1.0.1/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/core}/realtime_text_stabilizer.py +177 -8
- 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.1/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/core}/safepipe.py +26 -31
- realtimestt-1.0.2/RealtimeSTT/core/shutdown.py +69 -0
- {realtimestt-1.0.1/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/core}/silero_vad.py +100 -12
- 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.1 → realtimestt-1.0.2}/RealtimeSTT/install_kroko.py +111 -1
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/__init__.py +4 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/_model_utils.py +28 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/base.py +68 -6
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/cohere_transcribe_engine.py +15 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/factory.py +13 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/faster_whisper_engine.py +17 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/granite_speech_engine.py +15 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/hf_transformers_engines.py +85 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/kroko_onnx_engine.py +164 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/moonshine_engine.py +15 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/omnilingual_asr_engine.py +107 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/openai_api_engine.py +14 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/openai_whisper_engine.py +27 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/parakeet_engine.py +36 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/qwen3_asr_engine.py +36 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/sherpa_onnx_engine.py +90 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT/transcription_engines/whisper_cpp_engine.py +27 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT_server/stt_server.py +8 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2/realtimestt.egg-info}/PKG-INFO +8 -2
- {realtimestt-1.0.1 → realtimestt-1.0.2}/realtimestt.egg-info/SOURCES.txt +24 -6
- {realtimestt-1.0.1 → realtimestt-1.0.2}/setup.py +2 -2
- realtimestt-1.0.1/RealtimeSTT/audio_recorder.py +0 -4305
- {realtimestt-1.0.1 → realtimestt-1.0.2}/LICENSE +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/MANIFEST.in +0 -0
- {realtimestt-1.0.1/RealtimeSTT → realtimestt-1.0.2/RealtimeSTT/assets}/warmup_audio.wav +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT_server/__init__.py +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT_server/install_packages.py +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/RealtimeSTT_server/stt_cli_client.py +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/realtimestt.egg-info/dependency_links.txt +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/realtimestt.egg-info/entry_points.txt +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/realtimestt.egg-info/requires.txt +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/realtimestt.egg-info/top_level.txt +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/requirements.txt +0 -0
- {realtimestt-1.0.1 → realtimestt-1.0.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: realtimestt
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A fast Voice Activity Detection and Transcription System
|
|
5
5
|
Home-page: https://github.com/KoljaB/RealTimeSTT
|
|
6
6
|
Author: Kolja Beigel
|
|
@@ -223,6 +223,12 @@ speech into text with only a few lines of code.
|
|
|
223
223
|
The recommended default path uses `faster_whisper`. Other engines are available
|
|
224
224
|
through install extras when their optional dependencies and models are present.
|
|
225
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
|
+
|
|
226
232
|
## Demo
|
|
227
233
|
|
|
228
234
|
https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
|
|
@@ -231,7 +237,7 @@ https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
|
|
|
231
237
|
|
|
232
238
|
## Featured Integration: Kroko/Banafo ASR
|
|
233
239
|
|
|
234
|
-
RealtimeSTT
|
|
240
|
+
RealtimeSTT includes native support for `kroko_onnx`, the local streaming ASR
|
|
235
241
|
engine from the Kroko/Banafo team.
|
|
236
242
|
|
|
237
243
|
This integration has been on my wishlist for a long time. Kroko is a strong fit
|
|
@@ -9,6 +9,12 @@ speech into text with only a few lines of code.
|
|
|
9
9
|
The recommended default path uses `faster_whisper`. Other engines are available
|
|
10
10
|
through install extras when their optional dependencies and models are present.
|
|
11
11
|
|
|
12
|
+
### Support RealtimeSTT
|
|
13
|
+
|
|
14
|
+
If RealtimeSTT saved you time, one GitHub star is a simple way to help make it more stable.
|
|
15
|
+
|
|
16
|
+
Stars improve visibility and visibility brings more users, more real-world testing, more bug reports, more fixes, and better releases for everyone.
|
|
17
|
+
|
|
12
18
|
## Demo
|
|
13
19
|
|
|
14
20
|
https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
|
|
@@ -17,7 +23,7 @@ https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
|
|
|
17
23
|
|
|
18
24
|
## Featured Integration: Kroko/Banafo ASR
|
|
19
25
|
|
|
20
|
-
RealtimeSTT
|
|
26
|
+
RealtimeSTT includes native support for `kroko_onnx`, the local streaming ASR
|
|
21
27
|
engine from the Kroko/Banafo team.
|
|
22
28
|
|
|
23
29
|
This integration has been on my wishlist for a long time. Kroko is a strong fit
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## 1.0.2 - 2026-05-31
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Split the `AudioToTextRecorder` implementation behind the existing public
|
|
8
|
+
facade into focused core modules for lifecycle, recording, realtime
|
|
9
|
+
transcription, voice activity, wake-word handling, initialization, shutdown,
|
|
10
|
+
and formatting.
|
|
11
|
+
- Refreshed recorder architecture and compatibility documentation so the public
|
|
12
|
+
facade, threading boundaries, and regression checks are easier to audit.
|
|
13
|
+
- Normalized package docstrings and comments to use block-style summaries and
|
|
14
|
+
focused runtime explanations.
|
|
15
|
+
|
|
16
|
+
### Removed
|
|
17
|
+
|
|
18
|
+
- Removed an unused internal console color helper from `audio_recorder.py`.
|
|
19
|
+
|
|
3
20
|
## 1.0.1 - 2026-05-20
|
|
4
21
|
|
|
5
22
|
### Added
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Exposes the public RealtimeSTT package objects through lazy imports.
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
__all__ = [
|
|
2
6
|
"AudioToTextRecorder",
|
|
3
7
|
"AudioToTextRecorderClient",
|
|
@@ -9,6 +13,10 @@ __all__ = [
|
|
|
9
13
|
|
|
10
14
|
|
|
11
15
|
def __getattr__(name):
|
|
16
|
+
"""
|
|
17
|
+
Loads exported package attributes lazily.
|
|
18
|
+
"""
|
|
19
|
+
|
|
12
20
|
if name == "AudioToTextRecorder":
|
|
13
21
|
from .audio_recorder import AudioToTextRecorder
|
|
14
22
|
|
|
@@ -22,15 +30,15 @@ def __getattr__(name):
|
|
|
22
30
|
|
|
23
31
|
return AudioInput
|
|
24
32
|
if name == "RealtimeSpeechBoundaryDetector":
|
|
25
|
-
from .realtime_boundary_detector import RealtimeSpeechBoundaryDetector
|
|
33
|
+
from .core.realtime_boundary_detector import RealtimeSpeechBoundaryDetector
|
|
26
34
|
|
|
27
35
|
return RealtimeSpeechBoundaryDetector
|
|
28
36
|
if name == "SpeechBoundaryEvent":
|
|
29
|
-
from .realtime_boundary_detector import SpeechBoundaryEvent
|
|
37
|
+
from .core.realtime_boundary_detector import SpeechBoundaryEvent
|
|
30
38
|
|
|
31
39
|
return SpeechBoundaryEvent
|
|
32
40
|
if name == "SpeechBoundaryResult":
|
|
33
|
-
from .realtime_boundary_detector import SpeechBoundaryResult
|
|
41
|
+
from .core.realtime_boundary_detector import SpeechBoundaryResult
|
|
34
42
|
|
|
35
43
|
return SpeechBoundaryResult
|
|
36
44
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Provides PyAudio microphone input setup and chunk capture helpers.
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from colorama import init, Fore, Style
|
|
2
6
|
from scipy.signal import butter, filtfilt, resample_poly
|
|
3
7
|
import pyaudio
|
|
@@ -9,6 +13,10 @@ AUDIO_FORMAT = pyaudio.paInt16
|
|
|
9
13
|
CHANNELS = 1
|
|
10
14
|
|
|
11
15
|
class AudioInput:
|
|
16
|
+
"""
|
|
17
|
+
Captures and resamples microphone audio from a PyAudio input device.
|
|
18
|
+
"""
|
|
19
|
+
|
|
12
20
|
def __init__(
|
|
13
21
|
self,
|
|
14
22
|
input_device_index: int = None,
|
|
@@ -19,6 +27,9 @@ class AudioInput:
|
|
|
19
27
|
channels: int = CHANNELS,
|
|
20
28
|
resample_to_target: bool = True,
|
|
21
29
|
):
|
|
30
|
+
"""
|
|
31
|
+
Initializes audio input configuration without opening the stream.
|
|
32
|
+
"""
|
|
22
33
|
|
|
23
34
|
self.input_device_index = input_device_index
|
|
24
35
|
self.debug_mode = debug_mode
|
|
@@ -32,20 +43,22 @@ class AudioInput:
|
|
|
32
43
|
self.resample_to_target = resample_to_target
|
|
33
44
|
|
|
34
45
|
def get_supported_sample_rates(self, device_index):
|
|
35
|
-
"""
|
|
46
|
+
"""
|
|
47
|
+
Returns standard sample rates supported by the specified device.
|
|
48
|
+
"""
|
|
36
49
|
standard_rates = [8000, 9600, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000]
|
|
37
50
|
supported_rates = []
|
|
38
51
|
|
|
39
52
|
device_info = self.audio_interface.get_device_info_by_index(device_index)
|
|
40
|
-
max_channels = device_info.get('maxInputChannels')
|
|
53
|
+
max_channels = device_info.get('maxInputChannels')
|
|
41
54
|
|
|
42
55
|
for rate in standard_rates:
|
|
43
56
|
try:
|
|
44
57
|
if self.audio_interface.is_format_supported(
|
|
45
58
|
rate,
|
|
46
|
-
input_device=device_index,
|
|
47
|
-
input_channels=max_channels,
|
|
48
|
-
input_format=self.audio_format,
|
|
59
|
+
input_device=device_index,
|
|
60
|
+
input_channels=max_channels,
|
|
61
|
+
input_format=self.audio_format,
|
|
49
62
|
):
|
|
50
63
|
supported_rates.append(rate)
|
|
51
64
|
except:
|
|
@@ -53,7 +66,9 @@ class AudioInput:
|
|
|
53
66
|
return supported_rates
|
|
54
67
|
|
|
55
68
|
def _get_best_sample_rate(self, actual_device_index, desired_rate):
|
|
56
|
-
"""
|
|
69
|
+
"""
|
|
70
|
+
Determines the best available sample rate for the device.
|
|
71
|
+
"""
|
|
57
72
|
try:
|
|
58
73
|
device_info = self.audio_interface.get_device_info_by_index(actual_device_index)
|
|
59
74
|
supported_rates = self.get_supported_sample_rates(actual_device_index)
|
|
@@ -78,7 +93,9 @@ class AudioInput:
|
|
|
78
93
|
return 44100 # Safe fallback
|
|
79
94
|
|
|
80
95
|
def list_devices(self):
|
|
81
|
-
"""
|
|
96
|
+
"""
|
|
97
|
+
Lists all available audio input devices with supported sample rates.
|
|
98
|
+
"""
|
|
82
99
|
try:
|
|
83
100
|
init() # Initialize colorama
|
|
84
101
|
self.audio_interface = pyaudio.PyAudio()
|
|
@@ -95,7 +112,6 @@ class AudioInput:
|
|
|
95
112
|
supported_rates = self.get_supported_sample_rates(i)
|
|
96
113
|
print(f"{Fore.LIGHTGREEN_EX}Device {Style.RESET_ALL}{i}{Fore.LIGHTGREEN_EX}: {device_name}{Style.RESET_ALL}")
|
|
97
114
|
|
|
98
|
-
# Format each rate in cyan
|
|
99
115
|
if supported_rates:
|
|
100
116
|
rates_formatted = ", ".join([f"{Fore.CYAN}{rate}{Style.RESET_ALL}" for rate in supported_rates])
|
|
101
117
|
print(f" {Fore.YELLOW}Supported sample rates: {rates_formatted}{Style.RESET_ALL}")
|
|
@@ -109,7 +125,9 @@ class AudioInput:
|
|
|
109
125
|
self.audio_interface.terminate()
|
|
110
126
|
|
|
111
127
|
def setup(self):
|
|
112
|
-
"""
|
|
128
|
+
"""
|
|
129
|
+
Opens the configured audio input stream.
|
|
130
|
+
"""
|
|
113
131
|
try:
|
|
114
132
|
self.audio_interface = pyaudio.PyAudio()
|
|
115
133
|
|
|
@@ -150,15 +168,15 @@ class AudioInput:
|
|
|
150
168
|
|
|
151
169
|
def lowpass_filter(self, signal, cutoff_freq, sample_rate):
|
|
152
170
|
"""
|
|
153
|
-
|
|
171
|
+
Applies a low-pass Butterworth filter before resampling.
|
|
154
172
|
|
|
155
173
|
Args:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
174
|
+
- signal: Input audio samples to filter.
|
|
175
|
+
- cutoff_freq: Cutoff frequency in Hz.
|
|
176
|
+
- sample_rate: Source sample rate in Hz.
|
|
159
177
|
|
|
160
178
|
Returns:
|
|
161
|
-
|
|
179
|
+
- Filtered audio samples.
|
|
162
180
|
|
|
163
181
|
Notes:
|
|
164
182
|
- Uses a 5th order Butterworth filter
|
|
@@ -179,15 +197,15 @@ class AudioInput:
|
|
|
179
197
|
|
|
180
198
|
def resample_audio(self, pcm_data, target_sample_rate, original_sample_rate):
|
|
181
199
|
"""
|
|
182
|
-
|
|
200
|
+
Filters and resamples audio data to a target sample rate.
|
|
183
201
|
|
|
184
202
|
Args:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
203
|
+
- pcm_data: Input audio data.
|
|
204
|
+
- target_sample_rate: Desired output sample rate in Hz.
|
|
205
|
+
- original_sample_rate: Source sample rate in Hz.
|
|
188
206
|
|
|
189
207
|
Returns:
|
|
190
|
-
|
|
208
|
+
- Resampled audio data.
|
|
191
209
|
|
|
192
210
|
Notes:
|
|
193
211
|
- Applies anti-aliasing filter before resampling
|
|
@@ -203,11 +221,15 @@ class AudioInput:
|
|
|
203
221
|
return resampled
|
|
204
222
|
|
|
205
223
|
def read_chunk(self):
|
|
206
|
-
"""
|
|
224
|
+
"""
|
|
225
|
+
Reads one chunk from the active audio stream.
|
|
226
|
+
"""
|
|
207
227
|
return self.stream.read(self.chunk_size, exception_on_overflow=False)
|
|
208
228
|
|
|
209
229
|
def cleanup(self):
|
|
210
|
-
"""
|
|
230
|
+
"""
|
|
231
|
+
Releases audio resources.
|
|
232
|
+
"""
|
|
211
233
|
try:
|
|
212
234
|
if self.stream:
|
|
213
235
|
self.stream.stop_stream()
|