RealtimeTTS v0.4.3 Release Notes
New Feature: PiperEngine
-
Introduction
- Introducing the PiperEngine to support the Piper text-to-speech model.
-
Installation
-
Separate Installation Required: Piper must be installed separately from RealtimeTTS. Follow the Piper installation tutorial for Windows to set up Piper on your system.
-
Install RealtimeTTS:
pip install RealtimeTTS
Note: Unlike other engines, there is no need to install Piper support with
pip install RealtimeTTS[piper]
. The[piper]
option is not supported.
-
-
Usage
-
Configure PiperEngine:
- Specify the path to the Piper executable and the desired voice model using the
PiperVoice
andPiperEngine
classes. - Refer to the Piper test file for an example of how to set up and use PiperEngine in your projects.
- Specify the path to the Piper executable and the desired voice model using the
-
Example:
from RealtimeTTS import TextToAudioStream, PiperEngine, PiperVoice def dummy_generator(): yield "This is piper tts speaking." voice = PiperVoice( model_file="D:/Downloads/piper_windows_amd64/piper/en_US-kathleen-low.onnx", config_file="D:/Downloads/piper_windows_amd64/piper/en_US-kathleen-low.onnx.json", ) engine = PiperEngine( piper_path="D:/Downloads/piper_windows_amd64/piper/piper.exe", voice=voice, ) stream = TextToAudioStream(engine) stream.feed(dummy_generator()) stream.play()
-
Additional Information
-
Piper Resources:
- Installation Tutorial: Watch on YouTube
- Test File Example: piper_test.py
-
Support:
- If you have any issues or have questions about the new PiperEngine, please open an issue.