opensource-tts / README.md
Loomisgitarrist's picture
update
4914f46 verified
metadata
title: Opensource TTS
emoji: 🗣️
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
app_port: 7860

OpenSource TTS Server

A lightweight, standalone TTS server supporting Kokoro (high-quality) and Edge TTS (multilingual).

Features

  • Kokoro TTS: High-quality inference running locally (via ONNX).
  • Edge TTS: Access to Microsoft Edge's online multilingual voices.
  • Coqui XTTS-v2: (Optional) Voice cloning and high-quality multilingual support.
  • API: Simple REST API compatible with most clients.

API Endpoints

  • GET /health: Check server status.
  • GET /v1/voices: List available voices (Kokoro + Edge).
  • POST /v1/audio/speech: Generate audio (OpenAI-compatible endpoint).
    • Model: kokoro or edge-tts
    • Voice: see /v1/voices
    • Input: Text to speak.

Local Development

# Install dependencies
pip install -r requirements.txt

# Run server
uvicorn main:app --host 0.0.0.0 --port 7860

Docker / Hugging Face Spaces

This repository is configured for Hugging Face Spaces (Docker SDK). It runs on port 7860 by default.