Downloads · 30 days
10
21% of all-time downloads
kukuzaai/xtts-ug-lang
xtts-ug-lang is a text-to-speech model from kukuzaai. Use it when you need text read aloud. The card lists the license as other.
This model is a fine-tuned version of Coqui's XTTS-v2 designed to support multiple Ugandan languages.
Downloads · 30 days
10
21% of all-time downloads
All-time downloads
48
Public
Repo size
5.8 GB
Likes
0
Public
Click a slice to open those files.
.pth5.8 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of Coqui's XTTS-v2 designed to support multiple Ugandan languages.
The model was trained with special language tokens natively injected into the vocabulary:
[lg])[ach])[mas])[nyn])[sog])[en-ug])Trained on the reuben256/votex-v1 dataset comprising over 248 hours of high-quality speech data.
To use this with the standard Coqui TTS library, download the repository and load it locally. Make sure you use the patched config.json and vocab.json included in this repository.
Because the underlying library has strict language validation, you should set language="en" in the API call but include your specific language token (e.g., [lg]) directly inside the text string.
from TTS.api import TTS
# 1. Download the repo and set the paths to the local directory
model_dir = "./xtts-ug-lang"
config_path = f"{model_dir}/config.json"
# 2. Initialize the TTS API
tts = TTS(
model_path=model_dir,
config_path=config_path
)
# 3. Generate Audio
# Pass language="en" to bypass strict checks, but prepend the real language tag to the text.
text_to_speak = "[lg] Ekiseera kino kyamagero."
tts.tts_to_file(
text=text_to_speak,
speaker_wav="path/to/reference/speaker.wav", # Your reference audio for voice cloning
language="en",
file_path="output.wav"
)
print("Audio generated successfully!")