RealTimeSTT 0.3.81__tar.gz → 0.3.92__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-0.3.81 → realtimestt-0.3.92}/PKG-INFO +37 -4
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/README.md +24 -3
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT/audio_recorder.py +62 -19
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT.egg-info/PKG-INFO +37 -4
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT.egg-info/requires.txt +2 -2
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/setup.py +34 -34
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/LICENSE +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT/__init__.py +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT/audio_input.py +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT/audio_recorder_client.py +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT.egg-info/SOURCES.txt +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT.egg-info/dependency_links.txt +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT.egg-info/entry_points.txt +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT.egg-info/top_level.txt +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT_server/__init__.py +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT_server/install_packages.py +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT_server/stt_cli_client.py +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/RealtimeSTT_server/stt_server.py +0 -0
- {RealtimeSTT-0.3.81 → realtimestt-0.3.92}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: RealtimeSTT
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.92
|
|
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
|
|
@@ -12,6 +12,18 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Requires-Python: >=3.6
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
+
Requires-Dist: PyAudio==0.2.14
|
|
16
|
+
Requires-Dist: faster-whisper==1.1.0
|
|
17
|
+
Requires-Dist: pvporcupine==1.9.5
|
|
18
|
+
Requires-Dist: webrtcvad-wheels==2.0.14
|
|
19
|
+
Requires-Dist: halo==0.0.31
|
|
20
|
+
Requires-Dist: torch
|
|
21
|
+
Requires-Dist: torchaudio
|
|
22
|
+
Requires-Dist: scipy==1.14.1
|
|
23
|
+
Requires-Dist: openwakeword>=0.4.0
|
|
24
|
+
Requires-Dist: websockets==14.1
|
|
25
|
+
Requires-Dist: websocket-client==1.8.0
|
|
26
|
+
Requires-Dist: numpy<2.0.0
|
|
15
27
|
|
|
16
28
|
# RealtimeSTT
|
|
17
29
|
[](https://pypi.org/project/RealtimeSTT/)
|
|
@@ -43,7 +55,7 @@ https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
|
|
|
43
55
|
|
|
44
56
|
### Updates
|
|
45
57
|
|
|
46
|
-
Latest Version: v0.3.
|
|
58
|
+
Latest Version: v0.3.92
|
|
47
59
|
|
|
48
60
|
See [release history](https://github.com/KoljaB/RealtimeSTT/releases).
|
|
49
61
|
|
|
@@ -117,10 +129,27 @@ pip install RealtimeSTT
|
|
|
117
129
|
|
|
118
130
|
This will install all the necessary dependencies, including a **CPU support only** version of PyTorch.
|
|
119
131
|
|
|
120
|
-
Although it is possible to run RealtimeSTT with a CPU installation only (use a small model like "tiny" or "base" in this case) you will get way better experience using
|
|
132
|
+
Although it is possible to run RealtimeSTT with a CPU installation only (use a small model like "tiny" or "base" in this case) you will get way better experience using CUDA (please scroll down).
|
|
121
133
|
|
|
122
|
-
###
|
|
134
|
+
### Linux Installation
|
|
135
|
+
|
|
136
|
+
Before installing RealtimeSTT please execute:
|
|
123
137
|
|
|
138
|
+
```bash
|
|
139
|
+
sudo apt-get update
|
|
140
|
+
sudo apt-get install python3-dev
|
|
141
|
+
sudo apt-get install portaudio19-dev
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### MacOS Installation
|
|
145
|
+
|
|
146
|
+
Before installing RealtimeSTT please execute:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
brew install portaudio
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### GPU Support with CUDA (recommended)
|
|
124
153
|
|
|
125
154
|
### Updating PyTorch for CUDA Support
|
|
126
155
|
|
|
@@ -450,6 +479,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
|
|
|
450
479
|
|
|
451
480
|
- **level** (int, default=logging.WARNING): Logging level.
|
|
452
481
|
|
|
482
|
+
- **batch_size** (int, default=16): Batch size for the main transcription. Set to 0 to deactivate.
|
|
483
|
+
|
|
453
484
|
- **init_logging** (bool, default=True): Whether to initialize the logging framework. Set to False to manage this yourself.
|
|
454
485
|
|
|
455
486
|
- **handle_buffer_overflow** (bool, default=True): If set, the system will log a warning when an input overflow occurs during recording and remove the data from the buffer.
|
|
@@ -489,6 +520,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
|
|
|
489
520
|
|
|
490
521
|
- **on_realtime_transcription_stabilized**: A callback function that is triggered whenever there's an update in the real-time transcription and returns a higher quality, stabilized text as its argument.
|
|
491
522
|
|
|
523
|
+
- **realtime_batch_size**: (int, default=16): Batch size for the real-time transcription model. Set to 0 to deactivate.
|
|
524
|
+
|
|
492
525
|
- **beam_size_realtime** (int, default=3): The beam size to use for real-time transcription beam search decoding.
|
|
493
526
|
|
|
494
527
|
#### Voice Activation Parameters
|
|
@@ -28,7 +28,7 @@ https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
|
|
|
28
28
|
|
|
29
29
|
### Updates
|
|
30
30
|
|
|
31
|
-
Latest Version: v0.3.
|
|
31
|
+
Latest Version: v0.3.92
|
|
32
32
|
|
|
33
33
|
See [release history](https://github.com/KoljaB/RealtimeSTT/releases).
|
|
34
34
|
|
|
@@ -102,10 +102,27 @@ pip install RealtimeSTT
|
|
|
102
102
|
|
|
103
103
|
This will install all the necessary dependencies, including a **CPU support only** version of PyTorch.
|
|
104
104
|
|
|
105
|
-
Although it is possible to run RealtimeSTT with a CPU installation only (use a small model like "tiny" or "base" in this case) you will get way better experience using
|
|
105
|
+
Although it is possible to run RealtimeSTT with a CPU installation only (use a small model like "tiny" or "base" in this case) you will get way better experience using CUDA (please scroll down).
|
|
106
106
|
|
|
107
|
-
###
|
|
107
|
+
### Linux Installation
|
|
108
|
+
|
|
109
|
+
Before installing RealtimeSTT please execute:
|
|
108
110
|
|
|
111
|
+
```bash
|
|
112
|
+
sudo apt-get update
|
|
113
|
+
sudo apt-get install python3-dev
|
|
114
|
+
sudo apt-get install portaudio19-dev
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### MacOS Installation
|
|
118
|
+
|
|
119
|
+
Before installing RealtimeSTT please execute:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
brew install portaudio
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### GPU Support with CUDA (recommended)
|
|
109
126
|
|
|
110
127
|
### Updating PyTorch for CUDA Support
|
|
111
128
|
|
|
@@ -435,6 +452,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
|
|
|
435
452
|
|
|
436
453
|
- **level** (int, default=logging.WARNING): Logging level.
|
|
437
454
|
|
|
455
|
+
- **batch_size** (int, default=16): Batch size for the main transcription. Set to 0 to deactivate.
|
|
456
|
+
|
|
438
457
|
- **init_logging** (bool, default=True): Whether to initialize the logging framework. Set to False to manage this yourself.
|
|
439
458
|
|
|
440
459
|
- **handle_buffer_overflow** (bool, default=True): If set, the system will log a warning when an input overflow occurs during recording and remove the data from the buffer.
|
|
@@ -474,6 +493,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
|
|
|
474
493
|
|
|
475
494
|
- **on_realtime_transcription_stabilized**: A callback function that is triggered whenever there's an update in the real-time transcription and returns a higher quality, stabilized text as its argument.
|
|
476
495
|
|
|
496
|
+
- **realtime_batch_size**: (int, default=16): Batch size for the real-time transcription model. Set to 0 to deactivate.
|
|
497
|
+
|
|
477
498
|
- **beam_size_realtime** (int, default=3): The beam size to use for real-time transcription beam search decoding.
|
|
478
499
|
|
|
479
500
|
#### Voice Activation Parameters
|
|
@@ -34,6 +34,7 @@ from openwakeword.model import Model
|
|
|
34
34
|
from scipy.signal import resample
|
|
35
35
|
from scipy import signal
|
|
36
36
|
import signal as system_signal
|
|
37
|
+
from faster_whisper import WhisperModel, BatchedInferencePipeline
|
|
37
38
|
import faster_whisper
|
|
38
39
|
import openwakeword
|
|
39
40
|
import collections
|
|
@@ -87,11 +88,12 @@ if platform.system() != 'Darwin':
|
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
class TranscriptionWorker:
|
|
90
|
-
def __init__(self, conn, stdout_pipe, model_path, compute_type, gpu_device_index, device,
|
|
91
|
-
ready_event, shutdown_event, interrupt_stop_event, beam_size, initial_prompt, suppress_tokens):
|
|
91
|
+
def __init__(self, conn, stdout_pipe, model_path, download_root, compute_type, gpu_device_index, device,
|
|
92
|
+
ready_event, shutdown_event, interrupt_stop_event, beam_size, initial_prompt, suppress_tokens, batch_size):
|
|
92
93
|
self.conn = conn
|
|
93
94
|
self.stdout_pipe = stdout_pipe
|
|
94
95
|
self.model_path = model_path
|
|
96
|
+
self.download_root = download_root
|
|
95
97
|
self.compute_type = compute_type
|
|
96
98
|
self.gpu_device_index = gpu_device_index
|
|
97
99
|
self.device = device
|
|
@@ -101,6 +103,7 @@ class TranscriptionWorker:
|
|
|
101
103
|
self.beam_size = beam_size
|
|
102
104
|
self.initial_prompt = initial_prompt
|
|
103
105
|
self.suppress_tokens = suppress_tokens
|
|
106
|
+
self.batch_size = batch_size
|
|
104
107
|
self.queue = queue.Queue()
|
|
105
108
|
|
|
106
109
|
def custom_print(self, *args, **kwargs):
|
|
@@ -134,7 +137,10 @@ class TranscriptionWorker:
|
|
|
134
137
|
device=self.device,
|
|
135
138
|
compute_type=self.compute_type,
|
|
136
139
|
device_index=self.gpu_device_index,
|
|
140
|
+
download_root=self.download_root,
|
|
137
141
|
)
|
|
142
|
+
if self.batch_size > 0:
|
|
143
|
+
model = BatchedInferencePipeline(model=model)
|
|
138
144
|
except Exception as e:
|
|
139
145
|
logging.exception(f"Error initializing main faster_whisper transcription model: {e}")
|
|
140
146
|
raise
|
|
@@ -151,13 +157,24 @@ class TranscriptionWorker:
|
|
|
151
157
|
try:
|
|
152
158
|
audio, language = self.queue.get(timeout=0.1)
|
|
153
159
|
try:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
if self.batch_size > 0:
|
|
161
|
+
segments, info = model.transcribe(
|
|
162
|
+
audio,
|
|
163
|
+
language=language if language else None,
|
|
164
|
+
beam_size=self.beam_size,
|
|
165
|
+
initial_prompt=self.initial_prompt,
|
|
166
|
+
suppress_tokens=self.suppress_tokens,
|
|
167
|
+
batch_size=self.batch_size
|
|
168
|
+
)
|
|
169
|
+
else:
|
|
170
|
+
segments, info = model.transcribe(
|
|
171
|
+
audio,
|
|
172
|
+
language=language if language else None,
|
|
173
|
+
beam_size=self.beam_size,
|
|
174
|
+
initial_prompt=self.initial_prompt,
|
|
175
|
+
suppress_tokens=self.suppress_tokens
|
|
176
|
+
)
|
|
177
|
+
|
|
161
178
|
transcription = " ".join(seg.text for seg in segments).strip()
|
|
162
179
|
logging.debug(f"Final text detected with main model: {transcription}")
|
|
163
180
|
self.conn.send(('success', (transcription, info)))
|
|
@@ -195,6 +212,7 @@ class AudioToTextRecorder:
|
|
|
195
212
|
|
|
196
213
|
def __init__(self,
|
|
197
214
|
model: str = INIT_MODEL_TRANSCRIPTION,
|
|
215
|
+
download_root: str = None,
|
|
198
216
|
language: str = "",
|
|
199
217
|
compute_type: str = "default",
|
|
200
218
|
input_device_index: int = None,
|
|
@@ -208,6 +226,7 @@ class AudioToTextRecorder:
|
|
|
208
226
|
use_microphone=True,
|
|
209
227
|
spinner=True,
|
|
210
228
|
level=logging.WARNING,
|
|
229
|
+
batch_size: int = 16,
|
|
211
230
|
|
|
212
231
|
# Realtime transcription parameters
|
|
213
232
|
enable_realtime_transcription=False,
|
|
@@ -217,6 +236,7 @@ class AudioToTextRecorder:
|
|
|
217
236
|
init_realtime_after_seconds=INIT_REALTIME_INITIAL_PAUSE,
|
|
218
237
|
on_realtime_transcription_update=None,
|
|
219
238
|
on_realtime_transcription_stabilized=None,
|
|
239
|
+
realtime_batch_size: int = 16,
|
|
220
240
|
|
|
221
241
|
# Voice activation parameters
|
|
222
242
|
silero_sensitivity: float = INIT_SILERO_SENSITIVITY,
|
|
@@ -280,6 +300,8 @@ class AudioToTextRecorder:
|
|
|
280
300
|
'large-v2'.
|
|
281
301
|
If a specific size is provided, the model is downloaded
|
|
282
302
|
from the Hugging Face Hub.
|
|
303
|
+
- download_root (str, default=None): Specifies the root path were the Whisper models
|
|
304
|
+
are downloaded to. When empty, the default is used.
|
|
283
305
|
- language (str, default=""): Language code for speech-to-text engine.
|
|
284
306
|
If not specified, the model will attempt to detect the language
|
|
285
307
|
automatically.
|
|
@@ -314,6 +336,7 @@ class AudioToTextRecorder:
|
|
|
314
336
|
- spinner (bool, default=True): Show spinner animation with current
|
|
315
337
|
state.
|
|
316
338
|
- level (int, default=logging.WARNING): Logging level.
|
|
339
|
+
- batch_size (int, default=16): Batch size for the main transcription
|
|
317
340
|
- enable_realtime_transcription (bool, default=False): Enables or
|
|
318
341
|
disables real-time transcription of audio. When set to True, the
|
|
319
342
|
audio will be transcribed continuously as it is being recorded.
|
|
@@ -345,6 +368,8 @@ class AudioToTextRecorder:
|
|
|
345
368
|
triggered when the transcribed text stabilizes in quality. The
|
|
346
369
|
stabilized text is generally more accurate but may arrive with a
|
|
347
370
|
slight delay compared to the regular real-time updates.
|
|
371
|
+
- realtime_batch_size (int, default=16): Batch size for the real-time
|
|
372
|
+
transcription model.
|
|
348
373
|
- silero_sensitivity (float, default=SILERO_SENSITIVITY): Sensitivity
|
|
349
374
|
for the Silero Voice Activity Detection model ranging from 0
|
|
350
375
|
(least sensitive) to 1 (most sensitive). Default is 0.5.
|
|
@@ -508,6 +533,7 @@ class AudioToTextRecorder:
|
|
|
508
533
|
self.enable_realtime_transcription = enable_realtime_transcription
|
|
509
534
|
self.use_main_model_for_realtime = use_main_model_for_realtime
|
|
510
535
|
self.main_model_type = model
|
|
536
|
+
self.download_root = download_root
|
|
511
537
|
self.realtime_model_type = realtime_model_type
|
|
512
538
|
self.realtime_processing_pause = realtime_processing_pause
|
|
513
539
|
self.init_realtime_after_seconds = init_realtime_after_seconds
|
|
@@ -522,6 +548,8 @@ class AudioToTextRecorder:
|
|
|
522
548
|
self.beam_size = beam_size
|
|
523
549
|
self.beam_size_realtime = beam_size_realtime
|
|
524
550
|
self.allowed_latency_limit = allowed_latency_limit
|
|
551
|
+
self.batch_size = batch_size
|
|
552
|
+
self.realtime_batch_size = realtime_batch_size
|
|
525
553
|
|
|
526
554
|
self.level = level
|
|
527
555
|
self.audio_queue = mp.Queue()
|
|
@@ -630,7 +658,8 @@ class AudioToTextRecorder:
|
|
|
630
658
|
args=(
|
|
631
659
|
child_transcription_pipe,
|
|
632
660
|
child_stdout_pipe,
|
|
633
|
-
|
|
661
|
+
self.main_model_type,
|
|
662
|
+
self.download_root,
|
|
634
663
|
self.compute_type,
|
|
635
664
|
self.gpu_device_index,
|
|
636
665
|
self.device,
|
|
@@ -639,7 +668,8 @@ class AudioToTextRecorder:
|
|
|
639
668
|
self.interrupt_stop_event,
|
|
640
669
|
self.beam_size,
|
|
641
670
|
self.initial_prompt,
|
|
642
|
-
self.suppress_tokens
|
|
671
|
+
self.suppress_tokens,
|
|
672
|
+
self.batch_size
|
|
643
673
|
)
|
|
644
674
|
)
|
|
645
675
|
|
|
@@ -673,8 +703,11 @@ class AudioToTextRecorder:
|
|
|
673
703
|
model_size_or_path=self.realtime_model_type,
|
|
674
704
|
device=self.device,
|
|
675
705
|
compute_type=self.compute_type,
|
|
676
|
-
device_index=self.gpu_device_index
|
|
706
|
+
device_index=self.gpu_device_index,
|
|
707
|
+
download_root=self.download_root,
|
|
677
708
|
)
|
|
709
|
+
if self.realtime_batch_size > 0:
|
|
710
|
+
self.realtime_model_type = BatchedInferencePipeline(model=self.realtime_model_type)
|
|
678
711
|
|
|
679
712
|
except Exception as e:
|
|
680
713
|
logging.exception("Error initializing faster_whisper "
|
|
@@ -2066,13 +2099,23 @@ class AudioToTextRecorder:
|
|
|
2066
2099
|
continue
|
|
2067
2100
|
else:
|
|
2068
2101
|
# Perform transcription and assemble the text
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2102
|
+
if self.realtime_batch_size > 0:
|
|
2103
|
+
segments, info = self.realtime_model_type.transcribe(
|
|
2104
|
+
audio_array,
|
|
2105
|
+
language=self.language if self.language else None,
|
|
2106
|
+
beam_size=self.beam_size_realtime,
|
|
2107
|
+
initial_prompt=self.initial_prompt,
|
|
2108
|
+
suppress_tokens=self.suppress_tokens,
|
|
2109
|
+
batch_size=self.realtime_batch_size
|
|
2110
|
+
)
|
|
2111
|
+
else:
|
|
2112
|
+
segments, info = self.realtime_model_type.transcribe(
|
|
2113
|
+
audio_array,
|
|
2114
|
+
language=self.language if self.language else None,
|
|
2115
|
+
beam_size=self.beam_size_realtime,
|
|
2116
|
+
initial_prompt=self.initial_prompt,
|
|
2117
|
+
suppress_tokens=self.suppress_tokens
|
|
2118
|
+
)
|
|
2076
2119
|
|
|
2077
2120
|
self.detected_realtime_language = info.language if info.language_probability > 0 else None
|
|
2078
2121
|
self.detected_realtime_language_probability = info.language_probability
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: RealtimeSTT
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.92
|
|
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
|
|
@@ -12,6 +12,18 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Requires-Python: >=3.6
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
+
Requires-Dist: PyAudio==0.2.14
|
|
16
|
+
Requires-Dist: faster-whisper==1.1.0
|
|
17
|
+
Requires-Dist: pvporcupine==1.9.5
|
|
18
|
+
Requires-Dist: webrtcvad-wheels==2.0.14
|
|
19
|
+
Requires-Dist: halo==0.0.31
|
|
20
|
+
Requires-Dist: torch
|
|
21
|
+
Requires-Dist: torchaudio
|
|
22
|
+
Requires-Dist: scipy==1.14.1
|
|
23
|
+
Requires-Dist: openwakeword>=0.4.0
|
|
24
|
+
Requires-Dist: websockets==14.1
|
|
25
|
+
Requires-Dist: websocket-client==1.8.0
|
|
26
|
+
Requires-Dist: numpy<2.0.0
|
|
15
27
|
|
|
16
28
|
# RealtimeSTT
|
|
17
29
|
[](https://pypi.org/project/RealtimeSTT/)
|
|
@@ -43,7 +55,7 @@ https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
|
|
|
43
55
|
|
|
44
56
|
### Updates
|
|
45
57
|
|
|
46
|
-
Latest Version: v0.3.
|
|
58
|
+
Latest Version: v0.3.92
|
|
47
59
|
|
|
48
60
|
See [release history](https://github.com/KoljaB/RealtimeSTT/releases).
|
|
49
61
|
|
|
@@ -117,10 +129,27 @@ pip install RealtimeSTT
|
|
|
117
129
|
|
|
118
130
|
This will install all the necessary dependencies, including a **CPU support only** version of PyTorch.
|
|
119
131
|
|
|
120
|
-
Although it is possible to run RealtimeSTT with a CPU installation only (use a small model like "tiny" or "base" in this case) you will get way better experience using
|
|
132
|
+
Although it is possible to run RealtimeSTT with a CPU installation only (use a small model like "tiny" or "base" in this case) you will get way better experience using CUDA (please scroll down).
|
|
121
133
|
|
|
122
|
-
###
|
|
134
|
+
### Linux Installation
|
|
135
|
+
|
|
136
|
+
Before installing RealtimeSTT please execute:
|
|
123
137
|
|
|
138
|
+
```bash
|
|
139
|
+
sudo apt-get update
|
|
140
|
+
sudo apt-get install python3-dev
|
|
141
|
+
sudo apt-get install portaudio19-dev
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### MacOS Installation
|
|
145
|
+
|
|
146
|
+
Before installing RealtimeSTT please execute:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
brew install portaudio
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### GPU Support with CUDA (recommended)
|
|
124
153
|
|
|
125
154
|
### Updating PyTorch for CUDA Support
|
|
126
155
|
|
|
@@ -450,6 +479,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
|
|
|
450
479
|
|
|
451
480
|
- **level** (int, default=logging.WARNING): Logging level.
|
|
452
481
|
|
|
482
|
+
- **batch_size** (int, default=16): Batch size for the main transcription. Set to 0 to deactivate.
|
|
483
|
+
|
|
453
484
|
- **init_logging** (bool, default=True): Whether to initialize the logging framework. Set to False to manage this yourself.
|
|
454
485
|
|
|
455
486
|
- **handle_buffer_overflow** (bool, default=True): If set, the system will log a warning when an input overflow occurs during recording and remove the data from the buffer.
|
|
@@ -489,6 +520,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
|
|
|
489
520
|
|
|
490
521
|
- **on_realtime_transcription_stabilized**: A callback function that is triggered whenever there's an update in the real-time transcription and returns a higher quality, stabilized text as its argument.
|
|
491
522
|
|
|
523
|
+
- **realtime_batch_size**: (int, default=16): Batch size for the real-time transcription model. Set to 0 to deactivate.
|
|
524
|
+
|
|
492
525
|
- **beam_size_realtime** (int, default=3): The beam size to use for real-time transcription beam search decoding.
|
|
493
526
|
|
|
494
527
|
#### Voice Activation Parameters
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
PyAudio==0.2.14
|
|
2
|
-
faster-whisper==1.0
|
|
2
|
+
faster-whisper==1.1.0
|
|
3
3
|
pvporcupine==1.9.5
|
|
4
4
|
webrtcvad-wheels==2.0.14
|
|
5
5
|
halo==0.0.31
|
|
@@ -7,6 +7,6 @@ torch
|
|
|
7
7
|
torchaudio
|
|
8
8
|
scipy==1.14.1
|
|
9
9
|
openwakeword>=0.4.0
|
|
10
|
-
websockets==
|
|
10
|
+
websockets==14.1
|
|
11
11
|
websocket-client==1.8.0
|
|
12
12
|
numpy<2.0.0
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import setuptools
|
|
2
|
-
|
|
3
|
-
with open("README.md", "r") as fh:
|
|
4
|
-
long_description = fh.read()
|
|
5
|
-
|
|
6
|
-
# Read requirements.txt
|
|
7
|
-
with open('requirements.txt') as f:
|
|
8
|
-
requirements = f.read().splitlines()
|
|
9
|
-
|
|
10
|
-
setuptools.setup(
|
|
11
|
-
name="RealtimeSTT",
|
|
12
|
-
version="0.3.
|
|
13
|
-
author="Kolja Beigel",
|
|
14
|
-
author_email="kolja.beigel@web.de",
|
|
15
|
-
description="A fast Voice Activity Detection and Transcription System",
|
|
16
|
-
long_description=long_description,
|
|
17
|
-
long_description_content_type="text/markdown",
|
|
18
|
-
url="https://github.com/KoljaB/RealTimeSTT",
|
|
19
|
-
packages=setuptools.find_packages(include=["RealtimeSTT", "RealtimeSTT_server"]),
|
|
20
|
-
classifiers=[
|
|
21
|
-
"Programming Language :: Python :: 3",
|
|
22
|
-
"License :: OSI Approved :: MIT License",
|
|
23
|
-
"Operating System :: OS Independent",
|
|
24
|
-
],
|
|
25
|
-
python_requires='>=3.6',
|
|
26
|
-
install_requires=requirements,
|
|
27
|
-
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",
|
|
28
|
-
entry_points={
|
|
29
|
-
'console_scripts': [
|
|
30
|
-
'stt-server=RealtimeSTT_server.stt_server:main',
|
|
31
|
-
'stt=RealtimeSTT_server.stt_cli_client:main',
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
)
|
|
1
|
+
import setuptools
|
|
2
|
+
|
|
3
|
+
with open("README.md", "r") as fh:
|
|
4
|
+
long_description = fh.read()
|
|
5
|
+
|
|
6
|
+
# Read requirements.txt
|
|
7
|
+
with open('requirements.txt') as f:
|
|
8
|
+
requirements = f.read().splitlines()
|
|
9
|
+
|
|
10
|
+
setuptools.setup(
|
|
11
|
+
name="RealtimeSTT",
|
|
12
|
+
version="0.3.92",
|
|
13
|
+
author="Kolja Beigel",
|
|
14
|
+
author_email="kolja.beigel@web.de",
|
|
15
|
+
description="A fast Voice Activity Detection and Transcription System",
|
|
16
|
+
long_description=long_description,
|
|
17
|
+
long_description_content_type="text/markdown",
|
|
18
|
+
url="https://github.com/KoljaB/RealTimeSTT",
|
|
19
|
+
packages=setuptools.find_packages(include=["RealtimeSTT", "RealtimeSTT_server"]),
|
|
20
|
+
classifiers=[
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Operating System :: OS Independent",
|
|
24
|
+
],
|
|
25
|
+
python_requires='>=3.6',
|
|
26
|
+
install_requires=requirements,
|
|
27
|
+
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",
|
|
28
|
+
entry_points={
|
|
29
|
+
'console_scripts': [
|
|
30
|
+
'stt-server=RealtimeSTT_server.stt_server:main',
|
|
31
|
+
'stt=RealtimeSTT_server.stt_cli_client:main',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|