Kyutai TTS-integratie
Voer Kyutai-modellen lokaal uit. Deze gids behandelt Pocket TTS (CPU) en TTS 1.6B (GPU) met meegeleverde OpenAI-compatibele servers.
Overzicht
| Model | Parameters | Apparaat | Geschikt voor |
|---|---|---|---|
| Pocket TTS | 100M | Alleen CPU | Laptops, lichte omgevingen |
| TTS 1.6B | 1.6B | GPU/MPS/CPU | Servers, hoge kwaliteit |
Beide gebruiken CALM (Continuous Audio Language Models) en klonen vanaf audio.
Pocket TTS (CPU)
Realtime op CPU, zonder GPU.
Vereisten
| Onderdeel | Minimum |
|---|---|
| Python | 3.10 - 3.14 |
| PyTorch | 2.5+ |
| RAM | 4GB |
| Schijf | 500MB |
Snel starten
cd examples/kyutai-tts-server
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Start server
python server.py
Server: http://localhost:8200.
Test
curl http://localhost:8200/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{"model": "kyutai-tts", "input": "Hello, welcome to Libre WebUI!", "voice": "alba"}' \
--output speech.wav
Stemmen
| Stem | Beschrijving |
|---|---|
| Alba | Vrouwelijk, helder/natuurlijk |
| Marius | Mannelijk, warm |
| Javert | Mannelijk, gezaghebbend |
| Jean | Mannelijk, zacht |
| Fantine | Vrouwelijk, zacht |
| Cosette | Vrouwelijk, jong |
| Eponine | Vrouwelijk, expressief |
| Azelma | Vrouwelijk, helder |
Prestaties
- circa 6x realtime op MacBook Air M4
- circa 200ms eerste chunk
- 2 CPU-kernen
TTS 1.6B (GPU)
Automatische keuze CUDA > MPS > CPU.
Vereisten
| Onderdeel | Minimum | Aanbevolen |
|---|---|---|
| Python | 3.10+ | 3.12 |
| GPU VRAM | 6GB | 8GB+ |
| RAM | 8GB | 16GB+ |
| Schijf | 4GB | 8GB |
Platformen
| Platform | Backend | Notities |
|---|---|---|
| NVIDIA GPU | CUDA | Beste, bfloat16 |
| Apple Silicon | MPS | float16 |
| CPU | PyTorch | Langzaam, float32 |
Snel starten
cd examples/kyutai-tts-1.6b-server
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install PyTorch with CUDA (for NVIDIA GPUs)
pip install torch --index-url https://download.pytorch.org/whl/cu121
# Install dependencies
pip install -r requirements.txt
# Start server (auto-detects GPU)
python server.py
Server: http://localhost:8201.
Apparaat kiezen
# Auto-detect (CUDA > MPS > CPU)
python server.py
# Force specific device
python server.py --device cuda
python server.py --device mps
python server.py --device cpu
Test
curl http://localhost:8201/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{"model": "kyutai-tts-1.6b", "input": "Hello from the GPU!", "voice": "alba"}' \
--output speech.wav
Stemmen
Alba MacKenna (CC BY 4.0):
| Stem | Stijl |
|---|---|
alba / alba-casual | Informeel |
alba-merchant | Handelaar |
alba-announcer | Omroeper |
Expresso (CC BY-NC 4.0 - niet-commercieel):
| Stem | Emotie |
|---|---|
expresso-happy | Blij |
expresso-sad | Verdrietig |
expresso-angry | Boos |
VCTK (CC BY 4.0):
vctk-p225,vctk-p226,vctk-p227,vctk-p228
Stemklonen
Pocket TTS
# From local file
curl http://localhost:8200/v1/audio/voice-clone \
-F "input=Hello from a cloned voice" \
-F "reference_audio=@my_voice.wav" \
--output cloned.wav
# From HuggingFace URL
curl http://localhost:8200/v1/audio/voice-clone-url \
-H "Content-Type: application/json" \
-d '{
"input": "Hello world!",
"voice_url": "hf://kyutai/tts-voices/alba-mackenna/casual.wav"
}' \
--output speech.wav
TTS 1.6B
Gebruik een Hugging Face-pad als voice:
curl http://localhost:8201/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"model": "kyutai-tts-1.6b",
"input": "Custom voice synthesis",
"voice": "hf://kyutai/tts-voices/vctk/p230.wav"
}' \
--output speech.wav
API-referentie
Spraakgeneratie
Endpoint: POST /v1/audio/speech
{
"model": "kyutai-tts",
"input": "Text to convert to speech",
"voice": "alba",
"response_format": "wav",
"stream": false
}
| Parameter | Type | Standaard | Beschrijving |
|---|---|---|---|
model | string | varies | kyutai-tts of kyutai-tts-1.6b |
input | string | required | Tekst, max 10.000 |
voice | string | alba | Naam of Hugging Face-pad |
response_format | string | wav | Alleen wav |
stream | boolean | false | Alleen Pocket |
cfg_coef | float | 2.0 | Alleen 1.6B |
Antwoord: audio/wav
OpenAI-stemaliassen
| OpenAI | 1.6B | |
|---|---|---|
alloy | alba | alba |
echo | marius | vctk-p225 |
fable | cosette | expresso-happy |
onyx | javert | vctk-p226 |
nova | fantine | alba-announcer |
shimmer | eponine | alba-merchant |
Stemmenlijst
GET /v1/voices
Gezondheid
GET /health
Pluginconfiguratie
Pocket TTS
Instellingen > Plugins > Kyutai TTS, bestand plugins/kyutai-tts.json
{
"id": "kyutai-tts",
"name": "Kyutai TTS",
"type": "tts",
"endpoint": "http://localhost:8200/v1/audio/speech",
"capabilities": {
"tts": {
"config": {
"voices": [
"Alba",
"Marius",
"Javert",
"Jean",
"Fantine",
"Cosette",
"Eponine",
"Azelma"
],
"default_voice": "Alba",
"supports_streaming": true,
"no_auth_required": true
}
}
}
}
TTS 1.6B
Instellingen > Plugins > Kyutai TTS 1.6B, bestand plugins/kyutai-tts-1.6b.json
{
"id": "kyutai-tts-1.6b",
"name": "Kyutai TTS 1.6B",
"type": "tts",
"endpoint": "http://localhost:8201/v1/audio/speech",
"capabilities": {
"tts": {
"config": {
"voices": [
"Alba",
"Alba-Casual",
"Alba-Merchant",
"Alba-Announcer",
"Expresso-Happy",
"Expresso-Sad",
"Expresso-Angry",
"VCTK-P225",
"VCTK-P226"
],
"default_voice": "Alba",
"supports_streaming": true,
"no_auth_required": true
}
}
}
}
Netwerktoegang
# Start server on all interfaces
python server.py --host 0.0.0.0
# Access from another machine
curl http://192.168.1.100:8200/v1/audio/speech ...
{
"endpoint": "http://192.168.1.100:8200/v1/audio/speech"
}
Problemen oplossen
Modeldownload mislukt
# Set token for gated models
export HF_TOKEN=hf_...
CUDA-geheugen
Sluit andere GPU-apps, probeer cfg_coef=1.5 of gebruik Pocket.
Audiokwaliteit
Andere stem bij robotgeluid; lange tekst wordt automatisch gesplitst; model is geoptimaliseerd voor Engels/Frans.
MPS
RuntimeError: MPS backend error
python server.py --device cpu
Vergelijking met Qwen3-TTS
| Functie | 1.6B | Qwen3-TTS | |
|---|---|---|---|
| Parameters | 100M | 1.6B | 0.6B-1.7B |
| GPU | Nee | Optioneel | Ja |
| Talen | Engels | EN/FR | 10 talen |
| Klonen | Ja | Ja | Ja |
| Stemontwerp | Nee | Nee | Ja |
| Poort | 8200 | 8201 | 8100 |
Kyutai voor Engels/eenvoud; Qwen voor meertalig en stemontwerp.
Bronnen
- Kyutai TTS - officieel
- Pocket TTS GitHub - CPU
- Delayed Streams Modeling - 1.6B
- Stemcollectie
- Modelkaart