v0.4.3

KoljaB/RealtimeTTSv0.4.3Jan 2, 2025by KoljaB

AI Summary

Introduces the PiperEngine to support the Piper TTS model, requiring a separate installation of the Piper executable alongside the library.

Key Highlights

  • New PiperEngine support
  • Separate installation requirement for Piper
  • Usage examples and resources provided

New Features

  • PiperEngine support

Full Release Notes

# 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](https://www.youtube.com/watch?v=GGvdq3giiTQ) to set up Piper on your system.  
  
  - **Install RealtimeTTS:**
    ```bash
    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` and `PiperEngine` classes.
    - Refer to the [Piper test file](https://github.com/KoljaB/RealtimeTTS/blob/master/tests/piper_test.py) for an example of how to set up and use PiperEngine in your projects.
  
  - **Example:**
    ```python
    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](https://www.youtube.com/watch?v=GGvdq3giiTQ)
  - **Test File Example:** [piper_test.py](https://github.com/KoljaB/RealtimeTTS/blob/master/tests/piper_test.py)

- **Support:**
  - If you have any issues or have questions about the new PiperEngine, please [open an issue](https://github.com/KoljaB/RealtimeTTS/issues).