RealTimeSTT 0.1.7__tar.gz → 0.1.9__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Kolja Beigel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RealTimeSTT
3
- Version: 0.1.7
3
+ Version: 0.1.9
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
@@ -11,13 +11,14 @@ Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.6
13
13
  Description-Content-Type: text/markdown
14
- Requires-Dist: PyAudio>=0.2.13
15
- Requires-Dist: faster-whisper>=0.7.1
14
+ License-File: LICENSE
15
+ Requires-Dist: PyAudio==0.2.14
16
+ Requires-Dist: faster-whisper==0.10.0
16
17
  Requires-Dist: pvporcupine==1.9.5
17
- Requires-Dist: webrtcvad>=2.0.10
18
- Requires-Dist: halo>=0.0.31
19
- Requires-Dist: torch>=2.0.1
20
- Requires-Dist: torchaudio>=2.0.2
18
+ Requires-Dist: webrtcvad==2.0.10
19
+ Requires-Dist: halo==0.0.31
20
+ Requires-Dist: torch==2.1.2
21
+ Requires-Dist: torchaudio==2.1.2
21
22
 
22
23
 
23
24
  # RealtimeSTT
@@ -37,6 +38,17 @@ https://github.com/KoljaB/RealtimeSTT/assets/7604638/207cb9a2-4482-48e7-9d2b-072
37
38
 
38
39
  ### Updates
39
40
 
41
+ #### v0.1.9
42
+ - switched to torch.multiprocessing
43
+ - added compute_type, input_device_index and gpu_device_index parameters
44
+ - recorder.text() interruptable with recorder.abort()
45
+ - fix for #20
46
+
47
+ #### v0.1.8
48
+ - added [example](https://github.com/KoljaB/RealtimeSTT/tree/master/example_browserclient) how to realtime transcribe from browser microphone
49
+ - large-v3 whisper model now supported (upgrade to faster_whisper 0.10.0)
50
+ - added feed_audio() and use_microphone parameter to feed chunks
51
+
40
52
  #### v0.1.7
41
53
  - Bugfix for Mac OS Installation (multiprocessing / queue.size())
42
54
  - KeyboardInterrupt handling (now abortable with CTRL+C)
@@ -47,7 +59,6 @@ https://github.com/KoljaB/RealtimeSTT/assets/7604638/207cb9a2-4482-48e7-9d2b-072
47
59
  - Bugfix for resource management in shutdown method
48
60
 
49
61
  #### v0.1.5
50
-
51
62
  - Bugfix for detection of short speech right after sentence detection (the problem mentioned in the video)
52
63
  - Main transcription and recording moved into separate process contexts with multiprocessing
53
64
 
@@ -96,7 +107,7 @@ To use RealtimeSTT with GPU support via CUDA please follow these steps:
96
107
 
97
108
  1. **Install NVIDIA CUDA Toolkit 11.8**:
98
109
  - Visit [NVIDIA CUDA Toolkit Archive](https://developer.nvidia.com/cuda-11-8-0-download-archive).
99
- - Select version 11.
110
+ - Select operating system and version.
100
111
  - Download and install the software.
101
112
 
102
113
  2. **Install NVIDIA cuDNN 8.7.0 for CUDA 11.x**:
@@ -200,6 +211,14 @@ recorder = AudioToTextRecorder(on_recording_start=my_start_callback,
200
211
  on_recording_stop=my_stop_callback)
201
212
  ```
202
213
 
214
+ ### Feed chunks
215
+
216
+ If you don't want to use the local microphone set use_microphone parameter to false and provide raw PCM audiochunks in 16-bit mono (samplerate 16000) with this method:
217
+
218
+ ```python
219
+ recorder.feed_audio(audio_chunk)
220
+ ```
221
+
203
222
  ### Shutdown
204
223
 
205
224
  You can shutdown the recorder safely by using the context manager protocol:
@@ -261,7 +280,13 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
261
280
  - Options: 'tiny', 'tiny.en', 'base', 'base.en', 'small', 'small.en', 'medium', 'medium.en', 'large-v1', 'large-v2'.
262
281
  - Note: If a size is provided, the model will be downloaded from the Hugging Face Hub.
263
282
 
264
- - **language** (str, default=""): Language code for transcription. If left empty, the model will try to auto-detect the language.
283
+ - **language** (str, default=""): Language code for transcription. If left empty, the model will try to auto-detect the language. Supported language codes are listed in [Whisper Tokenizer library](https://github.com/openai/whisper/blob/main/whisper/tokenizer.py).
284
+
285
+ - **compute_type** (str, default="default"): Specifies the type of computation to be used for transcription. See [Whisper Quantization](https://opennmt.net/CTranslate2/quantization.html)
286
+
287
+ - **input_device_index** (int, default=0): Audio Input Device Index to use.
288
+
289
+ - **gpu_device_index** (int, default=0): GPU Device Index to use. The model can also be loaded on multiple GPUs by passing a list of IDs (e.g. [0, 1, 2, 3]).
265
290
 
266
291
  - **on_recording_start**: A callable function triggered when recording starts.
267
292
 
@@ -273,6 +298,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
273
298
 
274
299
  - **ensure_sentence_ends_with_period** (bool, default=True): Ensures that every sentence that doesn't end with punctuation such as "?", "!" ends with a period
275
300
 
301
+ - **use_microphone** (bool, default=True): Usage of local microphone for transcription. Set to False if you want to provide chunks with feed_audio method.
302
+
276
303
  - **spinner** (bool, default=True): Provides a spinner animation text with information about the current recorder state.
277
304
 
278
305
  - **level** (int, default=logging.WARNING): Logging level.
@@ -1,24 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: RealTimeSTT
3
- Version: 0.1.7
4
- Summary: A fast Voice Activity Detection and Transcription System
5
- Home-page: https://github.com/KoljaB/RealTimeSTT
6
- Author: Kolja Beigel
7
- Author-email: kolja.beigel@web.de
8
- 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
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
14
- Requires-Dist: PyAudio>=0.2.13
15
- Requires-Dist: faster-whisper>=0.7.1
16
- Requires-Dist: pvporcupine==1.9.5
17
- Requires-Dist: webrtcvad>=2.0.10
18
- Requires-Dist: halo>=0.0.31
19
- Requires-Dist: torch>=2.0.1
20
- Requires-Dist: torchaudio>=2.0.2
21
-
22
1
 
23
2
  # RealtimeSTT
24
3
 
@@ -37,6 +16,17 @@ https://github.com/KoljaB/RealtimeSTT/assets/7604638/207cb9a2-4482-48e7-9d2b-072
37
16
 
38
17
  ### Updates
39
18
 
19
+ #### v0.1.9
20
+ - switched to torch.multiprocessing
21
+ - added compute_type, input_device_index and gpu_device_index parameters
22
+ - recorder.text() interruptable with recorder.abort()
23
+ - fix for #20
24
+
25
+ #### v0.1.8
26
+ - added [example](https://github.com/KoljaB/RealtimeSTT/tree/master/example_browserclient) how to realtime transcribe from browser microphone
27
+ - large-v3 whisper model now supported (upgrade to faster_whisper 0.10.0)
28
+ - added feed_audio() and use_microphone parameter to feed chunks
29
+
40
30
  #### v0.1.7
41
31
  - Bugfix for Mac OS Installation (multiprocessing / queue.size())
42
32
  - KeyboardInterrupt handling (now abortable with CTRL+C)
@@ -47,7 +37,6 @@ https://github.com/KoljaB/RealtimeSTT/assets/7604638/207cb9a2-4482-48e7-9d2b-072
47
37
  - Bugfix for resource management in shutdown method
48
38
 
49
39
  #### v0.1.5
50
-
51
40
  - Bugfix for detection of short speech right after sentence detection (the problem mentioned in the video)
52
41
  - Main transcription and recording moved into separate process contexts with multiprocessing
53
42
 
@@ -96,7 +85,7 @@ To use RealtimeSTT with GPU support via CUDA please follow these steps:
96
85
 
97
86
  1. **Install NVIDIA CUDA Toolkit 11.8**:
98
87
  - Visit [NVIDIA CUDA Toolkit Archive](https://developer.nvidia.com/cuda-11-8-0-download-archive).
99
- - Select version 11.
88
+ - Select operating system and version.
100
89
  - Download and install the software.
101
90
 
102
91
  2. **Install NVIDIA cuDNN 8.7.0 for CUDA 11.x**:
@@ -200,6 +189,14 @@ recorder = AudioToTextRecorder(on_recording_start=my_start_callback,
200
189
  on_recording_stop=my_stop_callback)
201
190
  ```
202
191
 
192
+ ### Feed chunks
193
+
194
+ If you don't want to use the local microphone set use_microphone parameter to false and provide raw PCM audiochunks in 16-bit mono (samplerate 16000) with this method:
195
+
196
+ ```python
197
+ recorder.feed_audio(audio_chunk)
198
+ ```
199
+
203
200
  ### Shutdown
204
201
 
205
202
  You can shutdown the recorder safely by using the context manager protocol:
@@ -261,7 +258,13 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
261
258
  - Options: 'tiny', 'tiny.en', 'base', 'base.en', 'small', 'small.en', 'medium', 'medium.en', 'large-v1', 'large-v2'.
262
259
  - Note: If a size is provided, the model will be downloaded from the Hugging Face Hub.
263
260
 
264
- - **language** (str, default=""): Language code for transcription. If left empty, the model will try to auto-detect the language.
261
+ - **language** (str, default=""): Language code for transcription. If left empty, the model will try to auto-detect the language. Supported language codes are listed in [Whisper Tokenizer library](https://github.com/openai/whisper/blob/main/whisper/tokenizer.py).
262
+
263
+ - **compute_type** (str, default="default"): Specifies the type of computation to be used for transcription. See [Whisper Quantization](https://opennmt.net/CTranslate2/quantization.html)
264
+
265
+ - **input_device_index** (int, default=0): Audio Input Device Index to use.
266
+
267
+ - **gpu_device_index** (int, default=0): GPU Device Index to use. The model can also be loaded on multiple GPUs by passing a list of IDs (e.g. [0, 1, 2, 3]).
265
268
 
266
269
  - **on_recording_start**: A callable function triggered when recording starts.
267
270
 
@@ -273,6 +276,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
273
276
 
274
277
  - **ensure_sentence_ends_with_period** (bool, default=True): Ensures that every sentence that doesn't end with punctuation such as "?", "!" ends with a period
275
278
 
279
+ - **use_microphone** (bool, default=True): Usage of local microphone for transcription. Set to False if you want to provide chunks with feed_audio method.
280
+
276
281
  - **spinner** (bool, default=True): Provides a spinner animation text with information about the current recorder state.
277
282
 
278
283
  - **level** (int, default=logging.WARNING): Logging level.
@@ -343,4 +348,4 @@ MIT
343
348
 
344
349
  Kolja Beigel
345
350
  Email: kolja.beigel@web.de
346
- [GitHub](https://github.com/KoljaB/RealtimeSTT)
351
+ [GitHub](https://github.com/KoljaB/RealtimeSTT)
@@ -1,3 +1,25 @@
1
+ Metadata-Version: 2.1
2
+ Name: RealTimeSTT
3
+ Version: 0.1.9
4
+ Summary: A fast Voice Activity Detection and Transcription System
5
+ Home-page: https://github.com/KoljaB/RealTimeSTT
6
+ Author: Kolja Beigel
7
+ Author-email: kolja.beigel@web.de
8
+ 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
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.6
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: PyAudio==0.2.14
16
+ Requires-Dist: faster-whisper==0.10.0
17
+ Requires-Dist: pvporcupine==1.9.5
18
+ Requires-Dist: webrtcvad==2.0.10
19
+ Requires-Dist: halo==0.0.31
20
+ Requires-Dist: torch==2.1.2
21
+ Requires-Dist: torchaudio==2.1.2
22
+
1
23
 
2
24
  # RealtimeSTT
3
25
 
@@ -16,6 +38,17 @@ https://github.com/KoljaB/RealtimeSTT/assets/7604638/207cb9a2-4482-48e7-9d2b-072
16
38
 
17
39
  ### Updates
18
40
 
41
+ #### v0.1.9
42
+ - switched to torch.multiprocessing
43
+ - added compute_type, input_device_index and gpu_device_index parameters
44
+ - recorder.text() interruptable with recorder.abort()
45
+ - fix for #20
46
+
47
+ #### v0.1.8
48
+ - added [example](https://github.com/KoljaB/RealtimeSTT/tree/master/example_browserclient) how to realtime transcribe from browser microphone
49
+ - large-v3 whisper model now supported (upgrade to faster_whisper 0.10.0)
50
+ - added feed_audio() and use_microphone parameter to feed chunks
51
+
19
52
  #### v0.1.7
20
53
  - Bugfix for Mac OS Installation (multiprocessing / queue.size())
21
54
  - KeyboardInterrupt handling (now abortable with CTRL+C)
@@ -26,7 +59,6 @@ https://github.com/KoljaB/RealtimeSTT/assets/7604638/207cb9a2-4482-48e7-9d2b-072
26
59
  - Bugfix for resource management in shutdown method
27
60
 
28
61
  #### v0.1.5
29
-
30
62
  - Bugfix for detection of short speech right after sentence detection (the problem mentioned in the video)
31
63
  - Main transcription and recording moved into separate process contexts with multiprocessing
32
64
 
@@ -75,7 +107,7 @@ To use RealtimeSTT with GPU support via CUDA please follow these steps:
75
107
 
76
108
  1. **Install NVIDIA CUDA Toolkit 11.8**:
77
109
  - Visit [NVIDIA CUDA Toolkit Archive](https://developer.nvidia.com/cuda-11-8-0-download-archive).
78
- - Select version 11.
110
+ - Select operating system and version.
79
111
  - Download and install the software.
80
112
 
81
113
  2. **Install NVIDIA cuDNN 8.7.0 for CUDA 11.x**:
@@ -179,6 +211,14 @@ recorder = AudioToTextRecorder(on_recording_start=my_start_callback,
179
211
  on_recording_stop=my_stop_callback)
180
212
  ```
181
213
 
214
+ ### Feed chunks
215
+
216
+ If you don't want to use the local microphone set use_microphone parameter to false and provide raw PCM audiochunks in 16-bit mono (samplerate 16000) with this method:
217
+
218
+ ```python
219
+ recorder.feed_audio(audio_chunk)
220
+ ```
221
+
182
222
  ### Shutdown
183
223
 
184
224
  You can shutdown the recorder safely by using the context manager protocol:
@@ -240,7 +280,13 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
240
280
  - Options: 'tiny', 'tiny.en', 'base', 'base.en', 'small', 'small.en', 'medium', 'medium.en', 'large-v1', 'large-v2'.
241
281
  - Note: If a size is provided, the model will be downloaded from the Hugging Face Hub.
242
282
 
243
- - **language** (str, default=""): Language code for transcription. If left empty, the model will try to auto-detect the language.
283
+ - **language** (str, default=""): Language code for transcription. If left empty, the model will try to auto-detect the language. Supported language codes are listed in [Whisper Tokenizer library](https://github.com/openai/whisper/blob/main/whisper/tokenizer.py).
284
+
285
+ - **compute_type** (str, default="default"): Specifies the type of computation to be used for transcription. See [Whisper Quantization](https://opennmt.net/CTranslate2/quantization.html)
286
+
287
+ - **input_device_index** (int, default=0): Audio Input Device Index to use.
288
+
289
+ - **gpu_device_index** (int, default=0): GPU Device Index to use. The model can also be loaded on multiple GPUs by passing a list of IDs (e.g. [0, 1, 2, 3]).
244
290
 
245
291
  - **on_recording_start**: A callable function triggered when recording starts.
246
292
 
@@ -252,6 +298,8 @@ When you initialize the `AudioToTextRecorder` class, you have various options to
252
298
 
253
299
  - **ensure_sentence_ends_with_period** (bool, default=True): Ensures that every sentence that doesn't end with punctuation such as "?", "!" ends with a period
254
300
 
301
+ - **use_microphone** (bool, default=True): Usage of local microphone for transcription. Set to False if you want to provide chunks with feed_audio method.
302
+
255
303
  - **spinner** (bool, default=True): Provides a spinner animation text with information about the current recorder state.
256
304
 
257
305
  - **level** (int, default=logging.WARNING): Logging level.
@@ -322,4 +370,4 @@ MIT
322
370
 
323
371
  Kolja Beigel
324
372
  Email: kolja.beigel@web.de
325
- [GitHub](https://github.com/KoljaB/RealtimeSTT)
373
+ [GitHub](https://github.com/KoljaB/RealtimeSTT)
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  setup.py
3
4
  RealTimeSTT.egg-info/PKG-INFO
@@ -0,0 +1,7 @@
1
+ PyAudio==0.2.14
2
+ faster-whisper==0.10.0
3
+ pvporcupine==1.9.5
4
+ webrtcvad==2.0.10
5
+ halo==0.0.31
6
+ torch==2.1.2
7
+ torchaudio==2.1.2