Skip to content

SimpleTTS

A lightweight Python library for running TTS models with a unified API.

Warning

This project is under active development and APIs may change. Not recommended for production use yet.

Features

  • 🚀 Simple and intuitive API - get started in minutes
  • 🔄 No model lock-in - switch models with just a few lines of code
  • 🎯 Focus on ease of use - a single API for all models
  • 📦 Minimal dependencies - one package for all models
  • 🔌 Extensible architecture - easily add new models

Installation

Install the latest release from PyPI:

pip install simpletts

Or get the latest version from source:

pip install git+https://github.com/fakerybakery/simpletts

Quick Start (Simple API)

The Simple API provides the easiest way to get started with SimpleTTS. With just a few lines of code, you can generate natural-sounding speech. The Simple API should not be used in environments that require customization or voice cloning - it's designed for quick and easy use cases.

Python API

from simpletts.models.xtts import XTTS
import soundfile as sf

tts = XTTS(device="auto")
# Note: XTTS is licensed under the CPML license which restricts commercial use.

array, sr = tts.synthesize("Hello, world!", ref="sample.wav")

sf.write("output.wav", array, sr)

SimpleTTS vs SpeechToolkit

I am also working on another project, SpeechToolkit. SpeechToolkit is designed to be a more comprehensive library with more models and features (such as voice conversion and ASR). On the other hand, SimpleTTS is designed to be a lightweight library with a simple API and minimal customization.

Support & Feedback

If you encounter any issues or have questions, please open an issue.

License

This project is licensed under the BSD-3-Clause license. See the LICENSE file for more details.

While SimpleTTS itself is open source and can be used commercially, please note that some supported models have different licensing terms:

  • XTTS is licensed under CPML which restricts commercial use
  • Kokoro is licensed under Apache-2.0 which allows commercial use
  • Other models may have their own licensing requirements

Note that SimpleTTS does not use the GPL-licensed phonemizer library. Instead, it uses the BSD-licensed openphonemizer alternative. While this may slightly reduce pronunciation accuracy, it's license is compatible with the BSD-3-Clause license of SimpleTTS.

For complete licensing information for all included models and dependencies, please see the licenses directory.