RealTimeSTT 0.3.9__tar.gz → 0.3.81__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RealtimeSTT
3
- Version: 0.3.9
3
+ Version: 0.3.81
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,18 +12,6 @@ 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.0.3
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==v12.0
25
- Requires-Dist: websocket-client==1.8.0
26
- Requires-Dist: numpy<2.0.0
27
15
 
28
16
  # RealtimeSTT
29
17
  [![PyPI](https://img.shields.io/pypi/v/RealtimeSTT)](https://pypi.org/project/RealtimeSTT/)
@@ -55,7 +43,7 @@ https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
55
43
 
56
44
  ### Updates
57
45
 
58
- Latest Version: v0.3.9
46
+ Latest Version: v0.3.8
59
47
 
60
48
  See [release history](https://github.com/KoljaB/RealtimeSTT/releases).
61
49
 
@@ -129,26 +117,11 @@ pip install RealtimeSTT
129
117
 
130
118
  This will install all the necessary dependencies, including a **CPU support only** version of PyTorch.
131
119
 
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).
133
-
134
- ### Linux Installation
135
-
136
- Before installing RealtimeSTT please execute:
137
-
138
- ```bash
139
- sudo apt-get install portaudio19-dev
140
- ```
141
-
142
- ### MacOS Installation
143
-
144
- Before installing RealtimeSTT please execute:
145
-
146
- ```bash
147
- brew install portaudio
148
- ```
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:
149
121
 
150
122
  ### GPU Support with CUDA (recommended)
151
123
 
124
+
152
125
  ### Updating PyTorch for CUDA Support
153
126
 
154
127
  To upgrade your PyTorch installation to enable GPU support with CUDA, follow these instructions based on your specific CUDA version. This is useful if you wish to enhance the performance of RealtimeSTT with CUDA capabilities.
@@ -477,8 +450,6 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
477
450
 
478
451
  - **level** (int, default=logging.WARNING): Logging level.
479
452
 
480
- - **batch_size** (int, default=16): Batch size for the main transcription. Set to 0 to deactivate.
481
-
482
453
  - **init_logging** (bool, default=True): Whether to initialize the logging framework. Set to False to manage this yourself.
483
454
 
484
455
  - **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.
@@ -518,8 +489,6 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
518
489
 
519
490
  - **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.
520
491
 
521
- - **realtime_batch_size**: (int, default=16): Batch size for the real-time transcription model. Set to 0 to deactivate.
522
-
523
492
  - **beam_size_realtime** (int, default=3): The beam size to use for real-time transcription beam search decoding.
524
493
 
525
494
  #### 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.9
31
+ Latest Version: v0.3.8
32
32
 
33
33
  See [release history](https://github.com/KoljaB/RealtimeSTT/releases).
34
34
 
@@ -102,26 +102,11 @@ 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 CUDA (please scroll down).
106
-
107
- ### Linux Installation
108
-
109
- Before installing RealtimeSTT please execute:
110
-
111
- ```bash
112
- sudo apt-get install portaudio19-dev
113
- ```
114
-
115
- ### MacOS Installation
116
-
117
- Before installing RealtimeSTT please execute:
118
-
119
- ```bash
120
- brew install portaudio
121
- ```
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:
122
106
 
123
107
  ### GPU Support with CUDA (recommended)
124
108
 
109
+
125
110
  ### Updating PyTorch for CUDA Support
126
111
 
127
112
  To upgrade your PyTorch installation to enable GPU support with CUDA, follow these instructions based on your specific CUDA version. This is useful if you wish to enhance the performance of RealtimeSTT with CUDA capabilities.
@@ -450,8 +435,6 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
450
435
 
451
436
  - **level** (int, default=logging.WARNING): Logging level.
452
437
 
453
- - **batch_size** (int, default=16): Batch size for the main transcription. Set to 0 to deactivate.
454
-
455
438
  - **init_logging** (bool, default=True): Whether to initialize the logging framework. Set to False to manage this yourself.
456
439
 
457
440
  - **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.
@@ -491,8 +474,6 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
491
474
 
492
475
  - **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.
493
476
 
494
- - **realtime_batch_size**: (int, default=16): Batch size for the real-time transcription model. Set to 0 to deactivate.
495
-
496
477
  - **beam_size_realtime** (int, default=3): The beam size to use for real-time transcription beam search decoding.
497
478
 
498
479
  #### Voice Activation Parameters
@@ -34,7 +34,6 @@ 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
38
37
  import faster_whisper
39
38
  import openwakeword
40
39
  import collections
@@ -88,12 +87,11 @@ if platform.system() != 'Darwin':
88
87
 
89
88
 
90
89
  class TranscriptionWorker:
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):
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):
93
92
  self.conn = conn
94
93
  self.stdout_pipe = stdout_pipe
95
94
  self.model_path = model_path
96
- self.download_root = download_root
97
95
  self.compute_type = compute_type
98
96
  self.gpu_device_index = gpu_device_index
99
97
  self.device = device
@@ -103,7 +101,6 @@ class TranscriptionWorker:
103
101
  self.beam_size = beam_size
104
102
  self.initial_prompt = initial_prompt
105
103
  self.suppress_tokens = suppress_tokens
106
- self.batch_size = batch_size
107
104
  self.queue = queue.Queue()
108
105
 
109
106
  def custom_print(self, *args, **kwargs):
@@ -137,10 +134,7 @@ class TranscriptionWorker:
137
134
  device=self.device,
138
135
  compute_type=self.compute_type,
139
136
  device_index=self.gpu_device_index,
140
- download_root=self.download_root,
141
137
  )
142
- if self.batch_size > 0:
143
- model = BatchedInferencePipeline(model=model)
144
138
  except Exception as e:
145
139
  logging.exception(f"Error initializing main faster_whisper transcription model: {e}")
146
140
  raise
@@ -157,24 +151,13 @@ class TranscriptionWorker:
157
151
  try:
158
152
  audio, language = self.queue.get(timeout=0.1)
159
153
  try:
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
-
154
+ segments, info = model.transcribe(
155
+ audio,
156
+ language=language if language else None,
157
+ beam_size=self.beam_size,
158
+ initial_prompt=self.initial_prompt,
159
+ suppress_tokens=self.suppress_tokens
160
+ )
178
161
  transcription = " ".join(seg.text for seg in segments).strip()
179
162
  logging.debug(f"Final text detected with main model: {transcription}")
180
163
  self.conn.send(('success', (transcription, info)))
@@ -212,7 +195,6 @@ class AudioToTextRecorder:
212
195
 
213
196
  def __init__(self,
214
197
  model: str = INIT_MODEL_TRANSCRIPTION,
215
- download_root: str = None,
216
198
  language: str = "",
217
199
  compute_type: str = "default",
218
200
  input_device_index: int = None,
@@ -226,7 +208,6 @@ class AudioToTextRecorder:
226
208
  use_microphone=True,
227
209
  spinner=True,
228
210
  level=logging.WARNING,
229
- batch_size: int = 16,
230
211
 
231
212
  # Realtime transcription parameters
232
213
  enable_realtime_transcription=False,
@@ -236,7 +217,6 @@ class AudioToTextRecorder:
236
217
  init_realtime_after_seconds=INIT_REALTIME_INITIAL_PAUSE,
237
218
  on_realtime_transcription_update=None,
238
219
  on_realtime_transcription_stabilized=None,
239
- realtime_batch_size: int = 16,
240
220
 
241
221
  # Voice activation parameters
242
222
  silero_sensitivity: float = INIT_SILERO_SENSITIVITY,
@@ -300,8 +280,6 @@ class AudioToTextRecorder:
300
280
  'large-v2'.
301
281
  If a specific size is provided, the model is downloaded
302
282
  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.
305
283
  - language (str, default=""): Language code for speech-to-text engine.
306
284
  If not specified, the model will attempt to detect the language
307
285
  automatically.
@@ -336,7 +314,6 @@ class AudioToTextRecorder:
336
314
  - spinner (bool, default=True): Show spinner animation with current
337
315
  state.
338
316
  - level (int, default=logging.WARNING): Logging level.
339
- - batch_size (int, default=16): Batch size for the main transcription
340
317
  - enable_realtime_transcription (bool, default=False): Enables or
341
318
  disables real-time transcription of audio. When set to True, the
342
319
  audio will be transcribed continuously as it is being recorded.
@@ -368,8 +345,6 @@ class AudioToTextRecorder:
368
345
  triggered when the transcribed text stabilizes in quality. The
369
346
  stabilized text is generally more accurate but may arrive with a
370
347
  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.
373
348
  - silero_sensitivity (float, default=SILERO_SENSITIVITY): Sensitivity
374
349
  for the Silero Voice Activity Detection model ranging from 0
375
350
  (least sensitive) to 1 (most sensitive). Default is 0.5.
@@ -533,7 +508,6 @@ class AudioToTextRecorder:
533
508
  self.enable_realtime_transcription = enable_realtime_transcription
534
509
  self.use_main_model_for_realtime = use_main_model_for_realtime
535
510
  self.main_model_type = model
536
- self.download_root = download_root
537
511
  self.realtime_model_type = realtime_model_type
538
512
  self.realtime_processing_pause = realtime_processing_pause
539
513
  self.init_realtime_after_seconds = init_realtime_after_seconds
@@ -548,8 +522,6 @@ class AudioToTextRecorder:
548
522
  self.beam_size = beam_size
549
523
  self.beam_size_realtime = beam_size_realtime
550
524
  self.allowed_latency_limit = allowed_latency_limit
551
- self.batch_size = batch_size
552
- self.realtime_batch_size = realtime_batch_size
553
525
 
554
526
  self.level = level
555
527
  self.audio_queue = mp.Queue()
@@ -658,8 +630,7 @@ class AudioToTextRecorder:
658
630
  args=(
659
631
  child_transcription_pipe,
660
632
  child_stdout_pipe,
661
- self.main_model_type,
662
- self.download_root,
633
+ model,
663
634
  self.compute_type,
664
635
  self.gpu_device_index,
665
636
  self.device,
@@ -668,8 +639,7 @@ class AudioToTextRecorder:
668
639
  self.interrupt_stop_event,
669
640
  self.beam_size,
670
641
  self.initial_prompt,
671
- self.suppress_tokens,
672
- self.batch_size
642
+ self.suppress_tokens
673
643
  )
674
644
  )
675
645
 
@@ -703,11 +673,8 @@ class AudioToTextRecorder:
703
673
  model_size_or_path=self.realtime_model_type,
704
674
  device=self.device,
705
675
  compute_type=self.compute_type,
706
- device_index=self.gpu_device_index,
707
- download_root=self.download_root,
676
+ device_index=self.gpu_device_index
708
677
  )
709
- if self.realtime_batch_size > 0:
710
- self.realtime_model_type = BatchedInferencePipeline(model=self.realtime_model_type)
711
678
 
712
679
  except Exception as e:
713
680
  logging.exception("Error initializing faster_whisper "
@@ -2099,23 +2066,13 @@ class AudioToTextRecorder:
2099
2066
  continue
2100
2067
  else:
2101
2068
  # Perform transcription and assemble the text
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
- )
2069
+ segments, info = self.realtime_model_type.transcribe(
2070
+ audio_array,
2071
+ language=self.language if self.language else None,
2072
+ beam_size=self.beam_size_realtime,
2073
+ initial_prompt=self.initial_prompt,
2074
+ suppress_tokens=self.suppress_tokens,
2075
+ )
2119
2076
 
2120
2077
  self.detected_realtime_language = info.language if info.language_probability > 0 else None
2121
2078
  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.9
3
+ Version: 0.3.81
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,18 +12,6 @@ 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.0.3
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==v12.0
25
- Requires-Dist: websocket-client==1.8.0
26
- Requires-Dist: numpy<2.0.0
27
15
 
28
16
  # RealtimeSTT
29
17
  [![PyPI](https://img.shields.io/pypi/v/RealtimeSTT)](https://pypi.org/project/RealtimeSTT/)
@@ -55,7 +43,7 @@ https://github.com/user-attachments/assets/797e6552-27cd-41b1-a7f3-e5cbc72094f5
55
43
 
56
44
  ### Updates
57
45
 
58
- Latest Version: v0.3.9
46
+ Latest Version: v0.3.8
59
47
 
60
48
  See [release history](https://github.com/KoljaB/RealtimeSTT/releases).
61
49
 
@@ -129,26 +117,11 @@ pip install RealtimeSTT
129
117
 
130
118
  This will install all the necessary dependencies, including a **CPU support only** version of PyTorch.
131
119
 
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).
133
-
134
- ### Linux Installation
135
-
136
- Before installing RealtimeSTT please execute:
137
-
138
- ```bash
139
- sudo apt-get install portaudio19-dev
140
- ```
141
-
142
- ### MacOS Installation
143
-
144
- Before installing RealtimeSTT please execute:
145
-
146
- ```bash
147
- brew install portaudio
148
- ```
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:
149
121
 
150
122
  ### GPU Support with CUDA (recommended)
151
123
 
124
+
152
125
  ### Updating PyTorch for CUDA Support
153
126
 
154
127
  To upgrade your PyTorch installation to enable GPU support with CUDA, follow these instructions based on your specific CUDA version. This is useful if you wish to enhance the performance of RealtimeSTT with CUDA capabilities.
@@ -477,8 +450,6 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
477
450
 
478
451
  - **level** (int, default=logging.WARNING): Logging level.
479
452
 
480
- - **batch_size** (int, default=16): Batch size for the main transcription. Set to 0 to deactivate.
481
-
482
453
  - **init_logging** (bool, default=True): Whether to initialize the logging framework. Set to False to manage this yourself.
483
454
 
484
455
  - **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.
@@ -518,8 +489,6 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
518
489
 
519
490
  - **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.
520
491
 
521
- - **realtime_batch_size**: (int, default=16): Batch size for the real-time transcription model. Set to 0 to deactivate.
522
-
523
492
  - **beam_size_realtime** (int, default=3): The beam size to use for real-time transcription beam search decoding.
524
493
 
525
494
  #### Voice Activation Parameters
@@ -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.9",
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.81",
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