Skip to content

v0.4.3

Latest
Compare
Choose a tag to compare
@KoljaB KoljaB released this 02 Jan 09:14

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 and PiperEngine classes.
      • Refer to the Piper test file for an example of how to set up and use PiperEngine in your projects.
    • 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