An open API service indexing awesome lists of open source software.

https://github.com/intelligentsandbox/tts

custom tts system
https://github.com/intelligentsandbox/tts

kokoro onnx piper text-to-speech twitch

Last synced: about 1 month ago
JSON representation

custom tts system

Awesome Lists containing this project

README

          

# TTS

A FastAPI-based service for local, high-speed neural text-to-speech synthesis. Supports Piper and Kokoro backends.

https://github.com/user-attachments/assets/d545fa6f-5a4f-4dc7-8460-3a5d0ab15ff1

## Installation

```bash
# Install system requirements
sudo apt install ffmpeg

# Install python dependencies
python3 src/setup.py
source src/tts-venv/bin/activate
```

## Usage

**Start the service:**

```bash
cd src/
python app.py
```

**Python Example:**

```python
import requests

# Generate speech with an API key
response = requests.post(
"http://localhost:8000/api/tts",
headers={"X-API-Key": "secret-key"},
json={
"text": "Hello! [SFX: airhorn] Welcome.",
"voice": "en_US-ryan-high"
}
)

# Save the audio output
with open("speech.mp3", "wb") as f:
f.write(response.content)
```