VocoLoom Logo

VocoLoom

Modular multi-voice AI speech synthesis platform and microservice powered by F5-TTS, Vocos, and optional RVC.

🇬🇧 English · 🇩🇪 Deutsch


Overview

VocoLoom is a modular multi-voice AI speech synthesis platform and HTTP microservice built on F5-TTS (Flow-Matching DiT + CFM) and the Vocos vocoder, with optional RVC (Retrieval-based Voice Conversion) post-processing via an embedded Applio integration.

It exposes a Gradio 5 Web Studio, a FastAPI REST API (with OpenAPI/Swagger documentation at /docs), and a CLI (vocoloom.py), all sharing a unified VoiceManager that auto-discovers self-contained Voice Packs from voices/<voice_id>/.

Currently hosted voice pack:

  • Jürgen Seiferth (juergen_seiferth) — Fairground showman legend from „Die Welt ist unser Feld“ (1995), featuring Ruhrpott cadence and classic fairground expressions, including optional RVC refinement.
┌────────────────────────────────────────────────────┐
│  Clients: Web Studio (Gradio /) · REST API · CLI   │
└─────────────────────────┬──────────────────────────┘
                          ▼
┌────────────────────────────────────────────────────┐
│  VoiceManager (vocoloom/voice_manager.py)          │
│  • Auto-discovers voices/<voice_id>/               │
│  • VRAM model caching & phrase splitting           │
│  • F5-TTS (CFM + DiT) + Vocos vocoder (24 kHz)     │
│  • Optional RVC pass via Applio (rmvpe)            │
└─────────────────────────┬──────────────────────────┘
                          ▼
┌────────────────────────────────────────────────────┐
│  voices/<voice_id>/ (Voice Pack)                   │
│  voice.json · model.pt · reference.wav/.txt        │
└────────────────────────────────────────────────────┘

Features

  • Modular Voice-Pack Architecture: Each voice lives in its own directory voices/<voice_id>/ with metadata (voice.json), fine-tuned checkpoint (model.pt), reference audio (reference.wav), transcript (reference.txt), and avatar (avatar.png). New voices are automatically discovered on startup.
  • Natural Phrase Splitting: Automatically splits longer inputs at sentence boundaries (.!?) and commas (for phrases > 80 characters) and inserts 250 ms pauses between segments to prevent flow-trajectory drift.
  • VRAM Caching & Preloading: vocoloom/server.py preloads the first discovered voice into GPU VRAM on startup for low-latency synthesis and clears CUDA cache cleanly when switching voices.
  • Gradio Web Studio (/): Interactive browser interface with voice dropdown, dialect/tag badges, speech speed slider (0.6–1.4), optional RVC toggle, one-click sample sentences, and WAV audio playback.
  • FastAPI REST API (/api/v1/*): CORS-enabled HTTP endpoints with automatic Swagger UI at /docs returning audio/wav streams.
  • Command-Line Interface (vocoloom.py): List hosted voices, synthesize WAV files directly (with optional --play on Windows), or launch the combined Web UI + API server.
  • Optional RVC Post-Processing: When rvc_support.supported is true in voice.json, synthesis can optionally run through Applio (rmvpe F0 extraction, configurable rvc_index).
  • GPU-Accelerated Docker Image: Ready-to-deploy CUDA 12.4 + cuDNN 9 container (git.orfel.de/jannik/vocoloom:latest) with NVIDIA GPU reservation and healthcheck.

How It Works & Tech Stack

Voice-Pack Structure

Every voice pack resides in voices/<voice_id>/:

voices/
└── juergen_seiferth/
    ├── voice.json          # Metadata: id, name, subtitle, dialect, tags, defaults, rvc_support
    ├── model.pt            # Fine-tuned F5-TTS checkpoint (EMA or raw state dict)
    ├── reference.wav       # Clean reference audio clip
    ├── reference.txt       # Exact transcript (fallback if not in voice.json)
    └── avatar.png          # Avatar image served at /api/v1/voices/{id}/avatar

Tech Stack

Component Technology
TTS Engine f5-tts (>=0.2.0, Flow-Matching CFM + DiT with dim=1024, depth=22, heads=16), vocos (>=0.1.0, 24000 Hz)
Tokenization Custom German character vocabulary (models/F5-TTS-German/vocab.txt)
Voice Conversion (Optional) Embedded Applio (run_infer_script, f0_method="rmvpe")
Web API & Server FastAPI (>=0.115.0), Uvicorn (>=0.32.0), Pydantic (>=2.9.0)
Web Studio UI Gradio (>=5.0.0) mounted inside FastAPI at /
Audio & Numerics PyTorch (2.6.0 + CUDA 12.4 in Docker), soundfile, numpy, pillow
Default Port 7860

Prerequisites & Installation

Prerequisites

  • Python 3.10+ (for local execution) with an NVIDIA CUDA GPU recommended (CPU fallback is supported automatically if CUDA is unavailable)
  • FFmpeg & libsndfile1 installed on the system
  • Docker + NVIDIA Container Toolkit (for GPU Docker deployment)

Option 1: Local Installation

git clone https://git.orfel.de/Jannik/VocoLoom.git
cd VocoLoom
python -m venv .venv
# Linux/macOS: source .venv/bin/activate
# Windows: .venv\Scripts\activate
pip install -r requirements.txt

Option 2: Docker & GPU Deployment (Jannik-Cloud Standard)

VocoLoom follows the Docker-First workflow using the pre-built image in the Gitea Container Registry (git.orfel.de):

# Clone repository
git clone https://git.orfel.de/Jannik/VocoLoom.git
cd VocoLoom

# Build locally (optional)
docker build -t git.orfel.de/jannik/vocoloom:latest .

# Push to Gitea Container Registry (optional)
docker push git.orfel.de/jannik/vocoloom:latest

# Start GPU container with docker-compose.yml
docker compose up -d

docker-compose.yml mounts ./voices:/app/voices and ./models:/app/models, reserves 1 NVIDIA GPU, and exposes port 7860.


Configuration

Environment Variables

Variable Default Description
VOCOLOOM_PORT 7860 HTTP port for Web Studio & REST API
VOCOLOOM_HOST 0.0.0.0 Bind host address
NVIDIA_VISIBLE_DEVICES all Exposed GPU devices inside Docker

Adding a New Voice Pack (voice.json)

Create a new directory voices/<voice_id>/ containing model.pt, reference.wav, reference.txt (or inline reference_text), optional avatar.png, and voice.json:

{
  "id": "my_voice",
  "name": "Display Name",
  "subtitle": "Short Subtitle",
  "description": "Voice persona description.",
  "gender": "male",
  "language": "de",
  "dialect": "Standard",
  "tags": ["Tag1", "Tag2"],
  "engine": "f5-tts",
  "model_file": "model.pt",
  "reference_audio": "reference.wav",
  "reference_text": "Exact transcript of reference.wav",
  "default_speed": 1.0,
  "cfg_strength": 1.8,
  "nfe_step": 64,
  "sample_sentences": [
    "Sample sentence one."
  ],
  "rvc_support": {
    "supported": false
  }
}

Restart VocoLoom and the new voice pack is automatically available in the Web Studio, CLI, and REST API.


Usage

1. Start Web Studio & REST API

python webui.py

Or via the CLI:

python vocoloom.py serve --host 0.0.0.0 --port 7860
  • Web Studio: http://localhost:7860/
  • Swagger API Docs: http://localhost:7860/docs
  • Health Check: http://localhost:7860/health

On Windows, start_webui.bat activates .venv and launches python webui.py.

2. CLI Usage (vocoloom.py)

# List all hosted voices
python vocoloom.py list

# Synthesize speech to a WAV file
python vocoloom.py speak --voice juergen_seiferth "Mahlzeit Alexander!" -o ausgabe.wav

# Adjust speed and enable optional RVC refinement
python vocoloom.py speak -v juergen_seiferth "Jetzt ist aber fertig Ballett!" -s 1.0 --rvc --index 0.70 -o out.wav

3. REST API Examples

# Check server health & loaded device
curl http://localhost:7860/health

# List available voices
curl http://localhost:7860/api/v1/voices

# Get details for a specific voice
curl http://localhost:7860/api/v1/voices/juergen_seiferth

# Download voice avatar
curl http://localhost:7860/api/v1/voices/juergen_seiferth/avatar --output avatar.png

# Synthesize speech (returns audio/wav)
curl -X POST http://localhost:7860/api/v1/synthesize \
  -H "Content-Type: application/json" \
  -d '{"voice_id": "juergen_seiferth", "text": "Mahlzeit mein Lieber!", "speed": 1.0, "use_rvc": false, "rvc_index": 0.70}' \
  --output rede.wav

Project Structure

VocoLoom/
├── assets/
│   └── logo.png                     # Application logo
├── models/
│   └── F5-TTS-German/               # German base checkpoint & vocab.txt
├── personality/                     # Persona notes & Modelfile for Jürgen Seiferth
├── voices/
│   └── juergen_seiferth/            # Default Voice Pack (voice.json, model.pt, reference.wav/.txt, avatar.png)
├── vocoloom/
│   ├── __init__.py                  # Package exports (Voice, VoiceManager)
│   ├── voice.py                     # Voice dataclass & directory loader
│   ├── voice_manager.py             # Auto-discovery, VRAM management, F5-TTS & Applio synthesis
│   ├── api.py                       # FastAPI REST endpoints (/health, /api/v1/*)
│   ├── webui.py                     # Gradio 5 Web Studio UI
│   ├── server.py                    # Combined FastAPI + Gradio server & voice preloading
│   └── cli.py                       # CLI commands (list, speak, serve)
├── Applio/                          # Embedded RVC inference engine (optional)
├── webui.py                         # Server entrypoint
├── vocoloom.py                      # CLI entrypoint
├── start_webui.bat                  # Windows launcher
├── requirements.txt                 # Python dependencies
├── Dockerfile                       # PyTorch 2.6 + CUDA 12.4 container
└── docker-compose.yml               # GPU-enabled Docker Compose definition

License

This project's own code is dedicated to the public domain under CC0 1.0 Universal — see LICENSE.

Third-Party Components: External dependencies, bundled libraries, fonts, datasets, and media assets retain their own respective licenses and are excluded from CC0 1.0. See THIRD_PARTY_NOTICES.md for details.

S
Description
Modulare Multi-Voice KI-Sprachsynthese-Plattform (FastAPI, Gradio, F5-TTS & Vocos) mit Voice-Pack-Architektur.
Readme CC0-1.0
1.4 MiB
0 Stars 1 Watchers 0 Forks
Languages
Python 98.6%
Dockerfile 1%
Batchfile 0.4%