Aybee5 commited on
Commit
5e212bc
·
verified ·
1 Parent(s): 139ef77

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +184 -3
README.md CHANGED
@@ -1,3 +1,184 @@
1
- ---
2
- license: cc-by-nc-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ha
4
+ task_categories:
5
+ - text-to-speech
6
+ size_categories:
7
+ - 1K<n<10K
8
+ configs:
9
+ - config_name: default
10
+ data_files:
11
+ - split: train
12
+ path: data/train-*
13
+ dataset_info:
14
+ features:
15
+ - name: audio
16
+ dtype: audio
17
+ - name: text
18
+ dtype: string
19
+ - name: speaker_id
20
+ dtype: string
21
+ splits:
22
+ - name: train
23
+ num_examples: 1283
24
+ ---
25
+
26
+ # Hausa TTS Dataset (HausaTTSEmbed)
27
+
28
+ This dataset contains **1,283 Hausa language audio recordings** with transcriptions for Text-to-Speech (TTS) model training.
29
+
30
+ ## Dataset Details
31
+
32
+ - **Language:** Hausa (ha)
33
+ - **Total Samples:** 1,283
34
+ - **Speakers:** 3 unique speakers
35
+ - **Audio Format:** WAV files
36
+ - **Sample Rate:** Original recordings (will be resampled to 24kHz during training)
37
+ - **Text Length:** 4-141 characters (average: 24 characters)
38
+
39
+ ## Dataset Structure
40
+
41
+ Each example contains:
42
+
43
+ - **audio**: Audio file in WAV format
44
+ - **text**: Hausa transcription with proper diacritics (e.g., "Ansamu ɓaraka acikin shirin")
45
+ - **speaker_id**: UUID of the speaker (3 unique values)
46
+
47
+ ### Data Fields
48
+
49
+ ```python
50
+ {
51
+ 'audio': {
52
+ 'path': str, # Path to audio file
53
+ 'array': ndarray, # Audio waveform
54
+ 'sampling_rate': int
55
+ },
56
+ 'text': str, # Hausa transcription
57
+ 'speaker_id': str # Speaker identifier
58
+ }
59
+ ```
60
+
61
+ ## Usage
62
+
63
+ ### Basic Loading
64
+
65
+ ```python
66
+ from datasets import load_dataset
67
+
68
+ dataset = load_dataset("Aybee5/HausaTTSEmbed", split="train")
69
+ print(f"Loaded {len(dataset)} samples")
70
+
71
+ # Access first sample
72
+ sample = dataset[0]
73
+ print(f"Text: {sample['text']}")
74
+ print(f"Audio shape: {sample['audio']['array'].shape}")
75
+ ```
76
+
77
+ ### For Unsloth TTS Training
78
+
79
+ This dataset is optimized for Unsloth TTS training:
80
+
81
+ ```python
82
+ from datasets import load_dataset, Audio
83
+
84
+ # Load dataset
85
+ raw_ds = load_dataset("Aybee5/HausaTTSEmbed", split="train")
86
+
87
+ # Speaker handling (Unsloth code)
88
+ speaker_key = "source"
89
+ if "source" not in raw_ds.column_names and "speaker_id" not in raw_ds.column_names:
90
+ print("Unsloth: No speaker found, adding default source")
91
+ new_column = ["0"] * len(raw_ds)
92
+ raw_ds = raw_ds.add_column("source", new_column)
93
+ elif "source" not in raw_ds.column_names and "speaker_id" in raw_ds.column_names:
94
+ speaker_key = "speaker_id"
95
+
96
+ # Resample to target sample rate
97
+ target_sampling_rate = 24000
98
+ raw_ds = raw_ds.cast_column("audio", Audio(sampling_rate=target_sampling_rate))
99
+
100
+ # Optional: Split into train/validation
101
+ split_ds = raw_ds.train_test_split(test_size=0.1, seed=42)
102
+ train_ds = split_ds['train']
103
+ val_ds = split_ds['test']
104
+
105
+ print(f"Train: {len(train_ds)}, Validation: {len(val_ds)}")
106
+ ```
107
+
108
+ ### With Transformers
109
+
110
+ ```python
111
+ from transformers import AutoProcessor
112
+
113
+ processor = AutoProcessor.from_pretrained("your-tts-model")
114
+
115
+ def preprocess_function(examples):
116
+ audio_arrays = [x["array"] for x in examples["audio"]]
117
+
118
+ inputs = processor(
119
+ text=examples["text"],
120
+ audio=audio_arrays,
121
+ sampling_rate=24000,
122
+ return_tensors="pt",
123
+ padding=True
124
+ )
125
+
126
+ return inputs
127
+
128
+ # Apply preprocessing
129
+ processed_ds = dataset.map(
130
+ preprocess_function,
131
+ batched=True,
132
+ remove_columns=dataset.column_names
133
+ )
134
+ ```
135
+
136
+ ## Dataset Statistics
137
+
138
+ - **Total Samples:** 1,283
139
+ - **Unique Speakers:** 3
140
+ - **Text Statistics:**
141
+ - Average length: 24.0 characters
142
+ - Min length: 4 characters
143
+ - Max length: 141 characters
144
+ - Language: Hausa with proper Unicode diacritics
145
+
146
+ ## Data Source
147
+
148
+ This dataset was created using Mimic Studio recordings for Hausa language TTS development.
149
+
150
+ ## Intended Use
151
+
152
+ This dataset is intended for:
153
+ - Training Hausa Text-to-Speech models
154
+ - Fine-tuning multilingual TTS models on Hausa
155
+ - Research in low-resource language TTS
156
+ - Multi-speaker TTS model development
157
+
158
+ ## Limitations
159
+
160
+ - Limited to 3 speakers (may affect speaker diversity in trained models)
161
+ - Relatively small dataset size (1,283 samples)
162
+ - Audio quality depends on recording conditions
163
+
164
+ ## Citation
165
+
166
+ If you use this dataset, please cite:
167
+
168
+ ```bibtex
169
+ @dataset{hausa_tts_embed,
170
+ author = {Aybee5},
171
+ title = {Hausa TTS Dataset (HausaTTSEmbed)},
172
+ year = {2025},
173
+ publisher = {Hugging Face},
174
+ url = {https://huggingface.co/datasets/Aybee5/HausaTTSEmbed}
175
+ }
176
+ ```
177
+
178
+ ## License
179
+
180
+ Please specify your license here.
181
+
182
+ ## Contact
183
+
184
+ For questions or issues regarding this dataset, please open an issue in the dataset repository.