Skip to content

PyPiperTTS is a Python library that provides a simple and intuitive interface to the Piper text-to-speech system.

License

Notifications You must be signed in to change notification settings

broadfield-dev/PyPiperTTS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPiperTTS: A Python Interface for Piper Text-to-Speech

PyPiperTTS is a Python library that provides a simple and intuitive interface to the Piper text-to-speech system. It allows you to generate high-quality speech from text using pre-trained models.

Installation

To use PyPiperTTS, you'll need to have Python 3.6 or later installed on your system. You can install the required dependencies using pip:

pip install -r requirements.txt

Usage

Initializing the PyPiper Object

To start using PyPiperTTS, create an instance of the PyPiper class:

from pypipertts import PyPiper

piper = PyPiper()

Generating Speech

You can generate speech from text using the tts method:

output_file = piper.tts("Hello, world!")
print(output_file)

This will generate a WAV file containing the synthesized speech.

Streaming Speech

You can also stream the synthesized speech in real-time using the stream_tts method:

streamed_audio = piper.stream_tts("Hello, world!")
# play streamed audio

Saving and Loading Model Settings

You can save and load model settings using the save_set and load_set methods:

# Save model settings
set_file = piper.save_set("en_US-joe-medium", 1, 1, 1, 1)

# Load model settings
model, length, noise, width, pause = piper.load_set(set_file)
print(model, length, noise, width, pause)

Requirements

License

PyPiper is released under the MIT License.

About

PyPiperTTS is a Python library that provides a simple and intuitive interface to the Piper text-to-speech system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages