Ga naar hoofdinhoud

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

ModelParametersApparaatGeschikt voor
Pocket TTS100MAlleen CPULaptops, lichte omgevingen
TTS 1.6B1.6BGPU/MPS/CPUServers, hoge kwaliteit

Beide gebruiken CALM (Continuous Audio Language Models) en klonen vanaf audio.

Pocket TTS (CPU)

Realtime op CPU, zonder GPU.

Vereisten

OnderdeelMinimum
Python3.10 - 3.14
PyTorch2.5+
RAM4GB
Schijf500MB

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

StemBeschrijving
AlbaVrouwelijk, helder/natuurlijk
MariusMannelijk, warm
JavertMannelijk, gezaghebbend
JeanMannelijk, zacht
FantineVrouwelijk, zacht
CosetteVrouwelijk, jong
EponineVrouwelijk, expressief
AzelmaVrouwelijk, 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

OnderdeelMinimumAanbevolen
Python3.10+3.12
GPU VRAM6GB8GB+
RAM8GB16GB+
Schijf4GB8GB

Platformen

PlatformBackendNotities
NVIDIA GPUCUDABeste, bfloat16
Apple SiliconMPSfloat16
CPUPyTorchLangzaam, 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):

StemStijl
alba / alba-casualInformeel
alba-merchantHandelaar
alba-announcerOmroeper

Expresso (CC BY-NC 4.0 - niet-commercieel):

StemEmotie
expresso-happyBlij
expresso-sadVerdrietig
expresso-angryBoos

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
}
ParameterTypeStandaardBeschrijving
modelstringvarieskyutai-tts of kyutai-tts-1.6b
inputstringrequiredTekst, max 10.000
voicestringalbaNaam of Hugging Face-pad
response_formatstringwavAlleen wav
streambooleanfalseAlleen Pocket
cfg_coeffloat2.0Alleen 1.6B

Antwoord: audio/wav

OpenAI-stemaliassen

OpenAIPocket1.6B
alloyalbaalba
echomariusvctk-p225
fablecosetteexpresso-happy
onyxjavertvctk-p226
novafantinealba-announcer
shimmereponinealba-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

FunctiePocket1.6BQwen3-TTS
Parameters100M1.6B0.6B-1.7B
GPUNeeOptioneelJa
TalenEngelsEN/FR10 talen
KlonenJaJaJa
StemontwerpNeeNeeJa
Poort820082018100

Kyutai voor Engels/eenvoud; Qwen voor meertalig en stemontwerp.


Bronnen