Realtimestt

Latest version: v0.3.93

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.2.0

Training models

Look [here](https://github.com/dscripka/openWakeWord?tab=readme-ov-file#training-new-models) for information about how to train your own OpenWakeWord models. You can use a [simple Google Colab notebook](https://colab.research.google.com/drive/1q1oe2zOyZp7UsB3jJiQ1IFn8z5YfjwEb?usp=sharing) for a start or use a [more detailed notebook](https://github.com/dscripka/openWakeWord/blob/main/notebooks/automatic_model_training.ipynb) that enables more customization (can produce high quality models, but requires more development experience).

Convert model to ONNX format

You might need to use tf2onnx to convert tensorflow tflite models to onnx format:

bash
pip install -U tf2onnx
python -m tf2onnx.convert --tflite my_model_filename.tflite --output my_model_filename.onnx


Configure RealtimeSTT

Suggested starting parameters for OpenWakeWord usage:
python
with AudioToTextRecorder(
wakeword_backend="oww",
wake_words_sensitivity=0.35,
openwakeword_model_paths="word1.onnx,word2.onnx",
wake_word_buffer_duration=1,
) as recorder:



OpenWakeWord Test

1. Set up the openwakeword test project:
bash
mkdir samantha_wake_word && cd samantha_wake_word
curl -O https://raw.githubusercontent.com/KoljaB/RealtimeSTT/master/tests/openwakeword_test.py
curl -L https://huggingface.co/KoljaB/SamanthaOpenwakeword/resolve/main/suh_mahn_thuh.onnx -o suh_mahn_thuh.onnx
curl -L https://huggingface.co/KoljaB/SamanthaOpenwakeword/resolve/main/suh_man_tuh.onnx -o suh_man_tuh.onnx


Ensure you have `curl` installed for downloading files. If not, you can manually download the files from the provided URLs.

2. Create and activate a virtual environment:
bash
python -m venv venv


- For Windows:
bash
venv\Scripts\activate

- For Unix-like systems (Linux/macOS):
bash
source venv/bin/activate

- For macOS:
Use `python3` instead of `python` and `pip3` instead of `pip` if needed.

3. Install dependencies:
bash
python -m pip install --upgrade pip
python -m pip install RealtimeSTT
python -m pip install -U torch torchaudio --index-url https://download.pytorch.org/whl/cu121

The PyTorch installation command includes CUDA 12.1 support. Adjust if a different version is required.

4. Run the test script:
bash
python openwakeword_test.py


On the very first start some models for openwakeword are downloaded.

0.1.16

- explicitly setting the multiprocessing start method to 'spawn' (due to some changes in torch.multiprocessing)
- update faster_whisper to newest version

0.1.15

- added parameter **beam_size**
(int, default=5)
The beam size to use for beam search decoding
- added parameter **beam_size_realtime**
(int, default=3)
The beam size to use for real-time transcription beam search decoding.
- added parameter **initial_prompt**
(str or iterable of int, default=None)
Initial prompt to be fed to the transcription models.
- added parameter **suppress_tokens**
(list of int, default=[-1])
Tokens to be suppressed from the transcription output.
- added method **set_microphone**(microphone_on=True)
This parameter allows dynamical switching between recording from the input device configured in RealtimeSTT and chunks injected into the processing pipeline with the feed_audio-method

0.1.13

- added beam_size: int = 5 and beam_size_realtime: int = 3 parameters to AudioToTextRecorder constructor allowing faster (realtime) transcriptions by lowering the beamsizes
- added last_transcription_bytes containing the raw bytes from the last transcription
You can retrieve those bytes with recorder.last_transcription_bytes for further analysis, saving to file etc

0.1.12

- fixed [qsize issue](https://github.com/KoljaB/RealtimeSTT/issues/7#issuecomment-2016894792) for macOS
- upgrade requirements to torch 2.2.2

0.1.11

- added on_recorded_chunk callback to allow processing of audio chunks recorded from microphone by the client

Page 4 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.