XTTS v2 Fine-Tuned — Child Voice
This is a fine-tuned version of coqui/XTTS-v2 trained on the Samromur Children dataset to produce a child-like voice in English.
How to Use
pip install TTS==0.22.0 transformers==4.37.2 torch==2.1.0
import torch, soundfile as sf
from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts
from huggingface_hub import snapshot_download
# Download model
model_dir = snapshot_download("your-username/xtts-v2-child-voice-finetuned")
# Load
config = XttsConfig()
config.load_json(f"{model_dir}/config.json")
model = Xtts.init_from_config(config)
model.load_checkpoint(config, checkpoint_dir=model_dir, eval=True)
model.cuda()
# Generate child voice speech
out = model.synthesize(
"Hello! My name is Lily. I love playing with my toys!",
config,
speaker_wav=f"{model_dir}/reference_child.wav",
language="en"
)
sf.write("output.wav", out["wav"], 24000)
Training Details
- Base model: coqui/XTTS-v2
- Dataset: Samromur Children (Icelandic child voices)
- Epochs: 15
- Fine-tuning type: GPT encoder fine-tuning
- GPU: Tesla T4