Downloads · 30 days
11
19% of all-time downloads
yusasif/nigerian-accent-english
nigerian-accent-english is a machine learning model from yusasif. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A fine-tuned XTTS v2 model specialized for Nigerian-accented English text-to-speech synthesis with zero-shot voice cloning.
Downloads · 30 days
11
19% of all-time downloads
All-time downloads
59
Public
Repo size
2.3 GB
Likes
0
Public
Click a slice to open those files.
.pth2.3 GB · 100%
From the Hugging Face model README
A fine-tuned XTTS v2 model specialized for Nigerian-accented English text-to-speech synthesis with zero-shot voice cloning.
Given a short reference audio clip of any English speaker with a Nigerian accent, the model synthesizes any English text in that voice — preserving the natural Nigerian accent, rhythm, and prosody.
| Base model | XTTS v2 (coqui/XTTS-v2) |
| Language | English (Nigerian accent) |
| Architecture | GPT + VITS decoder |
| Task | Text-to-speech, zero-shot voice cloning |
| Sample rate | 24 kHz |
| License | Coqui Public Model License (CPML) |
pip install TTS
from TTS.api import TTS
tts = TTS("yusasif/nigerian-accent-english", gpu=True)
tts.tts_to_file(
text="Welcome to Nigeria. How can I assist you today?",
file_path="output.wav",
speaker_wav="reference_speaker.wav", # ~6 seconds of clean Nigerian-accented English
language="en",
)
from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts
import soundfile as sf
config = XttsConfig()
config.load_json("/path/to/model/config.json")
model = Xtts.init_from_config(config)
model.load_checkpoint(config, checkpoint_dir="/path/to/model/", eval=True)
model.cuda()
# Extract voice characteristics from reference audio
gpt_cond_latent, speaker_embedding = model.get_conditioning_latents(
audio_path="reference_speaker.wav"
)
# Synthesize
outputs = model.inference(
text="Welcome to Nigeria. How can I assist you today?",
language="en",
gpt_cond_latent=gpt_cond_latent,
speaker_embedding=speaker_embedding,
temperature=0.7,
speed=1.0,
)
sf.write("output.wav", outputs["wav"], 24000)
| Condition | Result |
|---|---|
| Clean studio recording | Best quality |
| Phone recording, quiet room | Good quality |
| Noisy background | Reduced quality |
| Less than 3 seconds | May not clone correctly |
| 6–12 seconds | Optimal |