BrianMwangi commited on
Commit
d852ae8
·
verified ·
1 Parent(s): 1d57d7c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +128 -0
README.md ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ki # Kikuyu language code
4
+ tags:
5
+ - text-to-speech
6
+ - tts
7
+ - kikuyu
8
+ - african-languages
9
+ - kenya
10
+ - vits
11
+ - mms
12
+ - facebook
13
+ license: cc-by-nc-4.0
14
+ datasets:
15
+ - facebook/multilingual_librispeech
16
+ pipeline_tag: text-to-speech
17
+ widget:
18
+ - text: "Mũthenya ũmwe, njũgũ ya ita yakoragwo na atumia a njũri cia kĩrĩra"
19
+ example_title: "Kikuyu Example"
20
+ ---
21
+
22
+ # African Kikuyu Text-to-Speech Model
23
+
24
+ ## Model Description
25
+
26
+ This is a Text-to-Speech (TTS) model for the Kikuyu language, one of the major languages spoken in Kenya. The model is based on Facebook's Massively Multilingual Speech (MMS) project and has been redeployed here for better discoverability and accessibility.
27
+
28
+ ## Language Information
29
+
30
+ - **Language**: Kikuyu (Gĩkũyũ)
31
+ - **Language Code**: `ki` (ISO 639-1), `kik` (ISO 639-3)
32
+ - **Family**: Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, J, Kikuyu-Kamba (J.10)
33
+ - **Speakers**: Approximately 8.1 million native speakers
34
+ - **Region**: Central Kenya
35
+
36
+ ## Model Details
37
+
38
+ - **Model Type**: VITS (Variational Inference with adversarial learning for end-to-end Text-to-Speech)
39
+ - **Base Model**: facebook/mms-tts-kik
40
+ - **Training Data**: Part of Facebook's MMS dataset
41
+ - **Supported Task**: Text-to-Speech synthesis for Kikuyu language
42
+
43
+ ## Usage
44
+
45
+ ### Using Transformers
46
+
47
+ ```python
48
+ from transformers import VitsModel, VitsTokenizer
49
+ import torch
50
+ import scipy.io.wavfile
51
+ import numpy as np
52
+
53
+ # Load model and tokenizer
54
+ model = VitsModel.from_pretrained("BrianMwangi/African-Kikuyu-TTS")
55
+ tokenizer = VitsTokenizer.from_pretrained("BrianMwangi/African-Kikuyu-TTS")
56
+
57
+ # Example text in Kikuyu
58
+ text = "Mũthenya ũmwe, njũgũ ya ita yakoragwo na atumia a njũri cia kĩrĩra"
59
+
60
+ # Generate speech
61
+ inputs = tokenizer(text, return_tensors="pt")
62
+ with torch.no_grad():
63
+ outputs = model(**inputs)
64
+
65
+ # Save audio file
66
+ audio = outputs.waveform.squeeze().cpu().numpy()
67
+ scipy.io.wavfile.write("kikuyu_speech.wav", rate=model.config.sampling_rate, data=audio)
68
+ ```
69
+
70
+ ### Using Pipeline
71
+
72
+ ```python
73
+ from transformers import pipeline
74
+
75
+ # Create TTS pipeline
76
+ tts = pipeline("text-to-speech", model="BrianMwangi/African-Kikuyu-TTS")
77
+
78
+ # Generate speech
79
+ speech = tts("Mũthenya ũmwe, njũgũ ya ita yakoragwo na atumia a njũri cia kĩrĩra")
80
+ ```
81
+
82
+ ## Examples
83
+
84
+ Here are some example phrases in Kikuyu:
85
+
86
+ - **"Wĩ mwega"** - "You are good"
87
+ - **"Nĩ kĩĩ gĩtũmi?"** - "What is the reason?"
88
+ - **"Ndĩ na gĩkeno nĩ ũndũ waku"** - "I am happy because of you"
89
+
90
+ ## Limitations
91
+
92
+ - The model quality depends on the training data from the original MMS dataset
93
+ - May not perform well on words or phrases not present in the training data
94
+ - Performance may vary with different dialects of Kikuyu
95
+
96
+ ## Ethical Considerations
97
+
98
+ This model is intended to:
99
+ - Promote and preserve the Kikuyu language in digital spaces
100
+ - Support language learning and accessibility
101
+ - Enable TTS applications for Kikuyu speakers
102
+
103
+ ## Citation
104
+
105
+ If you use this model, please cite both this repository and the original MMS paper:
106
+
107
+ ```bibtex
108
+ @article{pratap2023mms,
109
+ title={Scaling Speech Technology to 1,000+ Languages},
110
+ author={Pratap, Vineel and Tjandra, Andros and Shi, Bowen and Tomasello, Paden and Babu, Arun and Kundu, Sayani and Elkahky, Ali and Ni, Zhaoheng and Vyas, Apoorv and Conneau, Alexis and others},
111
+ journal={arXiv preprint arXiv:2305.13516},
112
+ year={2023}
113
+ }
114
+ ```
115
+
116
+ ## Acknowledgments
117
+
118
+ - **Facebook AI Research**: For developing the MMS models
119
+ - **Original Model**: facebook/mms-tts-kik
120
+ - **Community**: Kikuyu language speakers and African NLP community
121
+
122
+ ## Contact
123
+
124
+ For questions or issues related to this model deployment, please open an issue in this repository.
125
+
126
+ ---
127
+
128
+ *This model is a redistribution of Facebook's MMS Kikuyu TTS model, repackaged for better discoverability and ease of use.*