File size: 2,858 Bytes
5a7ebd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cd36994
5a7ebd6
609d268
5a7ebd6
 
 
 
 
 
cd36994
5a7ebd6
 
 
 
 
 
 
 
 
 
 
 
 
 
cd36994
5a7ebd6
 
 
 
 
 
245c6f0
5a7ebd6
cd36994
5a7ebd6
 
cd36994
245c6f0
5a7ebd6
 
 
 
 
 
cd36994
5a7ebd6
 
 
cd36994
 
 
5a7ebd6
 
 
cd36994
5a7ebd6
 
 
 
 
 
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
---
language:
- sw
license: cc-by-nc-4.0
base_model: facebook/mms-tts-swh
tags:
- text-to-speech
- tts
- vits
- swahili
- mms
datasets:
- google/WaxalNLP
pipeline_tag: text-to-speech
---

# TTSModel — Swahili TTS

A Swahili text-to-speech model, finetuned from Meta's [MMS-TTS Swahili](https://huggingface.co/facebook/mms-tts-swh) checkpoint on the `swa_tts` split of [google/WaxalNLP](https://huggingface.co/datasets/google/WaxalNLP), using the [VITS finetuning recipe](https://github.com/ylacombe/finetune-hf-vits) from `ylacombe/finetune-hf-vits`. Developed by the Maseno Centre for Applied AI (MCAAI).

## Model details

- **Base model:** `facebook/mms-tts-swh` (Meta's Massively Multilingual Speech TTS, Swahili)
- **Architecture:** VITS (single-speaker)
- **Training data:** [google/WaxalNLP](https://huggingface.co/datasets/google/WaxalNLP), `swa_tts` config — 1,387 train utterances (805 after duration/length filtering), single Swahili speaker, 16kHz audio, sourced via the Loud & Clear initiative.
- **Training checkpoint:** step 4,500 / 20,200 planned steps
- **Sample rate:** 16,000 Hz
- **Language:** Swahili (`swh` / ISO 639-3)

## Training configuration

| Setting | Value |
|---|---|
| Learning rate | 2e-5 |
| Batch size | 8 |
| Precision | fp16 |
| Max clip duration | 20s |
| Min clip duration | 0.5s |
| Loss weights | mel=35, kl=1.5, disc=3, gen/fmaps/duration=1 |

Training used the `finetune-hf-vits` recipe with `transformers==4.35.1`, `datasets==2.14.7`, `accelerate==0.24.1`, `numpy<2.0`.

## Usage

```python
import numpy as np
from transformers import pipeline
from IPython.display import Audio as IPyAudio

synthesiser = pipeline("text-to-speech", model="MCAA1-MSU/TTSModel")
speech = synthesiser("Habari yako, karibu Kenya.")

audio = np.squeeze(speech["audio"])
display(IPyAudio(audio, rate=speech["sampling_rate"]))
```

Verified loading cleanly with `transformers` `pipeline("text-to-speech", ...)` — no missing/unexpected weight warnings on load.

## Intended use

Research and experimentation with Swahili TTS.

## Limitations

- **Single speaker, single dataset**: may not generalize well to varied Swahili dialects, accents, or speaking styles.
- **No formal evaluation yet**: no MOS, WER, or MCD scores computed. Qualitative spot-checks suggest intelligible but rough output.
- **Small dataset**: ~800 training utterances after filtering.

## License

Derived from `facebook/mms-tts-swh` (**CC-BY-NC-4.0**, non-commercial). This finetuned model inherits that license. `swa_tts` training data is CC-BY-SA-4.0.

## Acknowledgements

- [Meta MMS](https://huggingface.co/facebook/mms-tts-swh) for the base checkpoint
- [WAXAL / google/WaxalNLP](https://huggingface.co/datasets/google/WaxalNLP) for the training data
- [ylacombe/finetune-hf-vits](https://github.com/ylacombe/finetune-hf-vits) for the finetuning recipe