File size: 2,429 Bytes
25f6834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
license: apache-2.0
language:
  - ig
  - yo
  - ha
  - pcm
tags:
  - text-to-speech
  - tts
  - african-languages
  - voice-cloning
  - spark-tts
datasets:
  - chukypedro/african_voice
---

# Spark-TTS African Voice

Text-to-speech model for African languages, fine-tuned using the
[Spark-TTS](https://github.com/SparkAudio/Spark-TTS) / [SparkVox](https://github.com/SparkAudio/SparkVox) framework.

## Languages Supported
- **Igbo** (ig)
- **Yoruba** (yo)
- **Hausa** (ha)
- **Nigerian Pidgin** (pcm)

## Features
- **Text-to-Speech (TTS)**: Generate natural speech from text
- **Voice Cloning**: Clone any voice from a short reference audio
- **Controllable TTS**: Control pitch, speed, and gender

## Model Structure
This model follows the official Spark-TTS HuggingFace format:
```
β”œβ”€β”€ config.yaml
β”œβ”€β”€ BiCodec/
β”‚   β”œβ”€β”€ config.yaml
β”‚   └── model.safetensors
β”œβ”€β”€ LLM/
β”‚   β”œβ”€β”€ config.json
β”‚   β”œβ”€β”€ model.safetensors
β”‚   └── (tokenizer files)
└── wav2vec2-large-xlsr-53/
    β”œβ”€β”€ config.json
    β”œβ”€β”€ preprocessor_config.json
    └── pytorch_model.bin
```

## Usage with Spark-TTS Inference
```python
# 1. Clone the official Spark-TTS inference repo
# git clone https://github.com/SparkAudio/Spark-TTS.git
# cd Spark-TTS

# 2. Download this model
# from huggingface_hub import snapshot_download
# snapshot_download("NaijaLingo/Spark-TTS-African", local_dir="pretrained_models/Spark-TTS-African")

# 3. Run inference
from cli.SparkTTS import SparkTTS

model = SparkTTS(model_dir="pretrained_models/Spark-TTS-African", device="cuda:0")

# Voice cloning
wav = model.inference(
    text="How you dey, hope say you dey fine?",
    prompt_speech_path="path/to/reference.wav",
    prompt_text="Optional transcript of reference audio",
)

# Controllable TTS (no reference audio needed)
wav = model.inference(
    text="Sannu da zuwa, yaya kake?",
    gender="female",
    pitch="moderate",
    speed="moderate",
)
```

## Training Details
| Component | Details |
|-----------|---------|
| **Base LLM** | Qwen2.5-0.5B-Instruct |
| **Audio Tokenizer** | BiCodec (fine-tuned on African voice data) |
| **Feature Extractor** | wav2vec2-large-xlsr-53 |
| **Dataset** | [chukypedro/african_voice](https://huggingface.co/datasets/chukypedro/african_voice) |
| **Training Framework** | [SparkVox](https://github.com/SparkAudio/SparkVox) |

## License
Apache 2.0