File size: 8,967 Bytes
dc2f36e
 
 
e2bf16b
dc2f36e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
03876bf
dc2f36e
 
 
e2bf16b
16d0053
dc2f36e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2bf16b
dc2f36e
 
f28fefc
dc2f36e
 
 
 
 
 
 
 
03876bf
 
dc2f36e
e2bf16b
03876bf
 
dc2f36e
 
03876bf
e2bf16b
 
 
03876bf
e2bf16b
dc2f36e
 
e2bf16b
 
dc2f36e
e2bf16b
dc2f36e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2bf16b
dc2f36e
 
 
 
 
 
 
 
 
 
e2bf16b
dc2f36e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2bf16b
dc2f36e
 
e2bf16b
 
dc2f36e
e2bf16b
 
 
 
 
dc2f36e
 
e2bf16b
dc2f36e
 
e2bf16b
 
 
 
 
 
 
 
 
 
 
dc2f36e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2bf16b
dc2f36e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2bf16b
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
---
language:
- ar
- en
license: apache-2.0
tags:
- text-to-speech
- tts
- audio
- speech
- palestinian-arabic
- arabic
- voice-cloning
- miratts
- sofelia
base_model: YatharthS/MiraTTS
library_name: transformers
pipeline_tag: text-to-speech
---

<div style="text-align: center;">
  <h1>๐Ÿ‡ต๐Ÿ‡ธ Sofelia-TTS ๐Ÿ‡ต๐Ÿ‡ธ</h1>
  <p><strong>Palestinian Arabic Text-to-Speech Model</strong></p>
  <p><em>Palestine will be free</em> ๐Ÿ•Š๏ธ</p>
  <p><img style="margin: auto; width: 500px" src="https://huggingface.co/hamdallah/Sofelia-TTS/resolve/main/Sofelia.png" /></p>
</div>

---

## ๐ŸŒŸ Model Description

**Sofelia-TTS** is a fine-tuned Text-to-Speech (TTS) model specifically trained for **Palestinian Arabic dialect**. This model brings the beautiful sounds of Palestinian speech to AI, preserving and celebrating the linguistic heritage of Palestine.

Built on top of [YatharthS/MiraTTS](https://huggingface.co/YatharthS/MiraTTS), Sofelia-TTS captures the unique phonetic characteristics, intonation patterns, and prosody of Palestinian Arabic, making it ideal for:

- ๐ŸŽ™๏ธ **Voice cloning** with Palestinian Arabic speech
- ๐Ÿ“š **Audiobook generation** in Palestinian dialect
- ๐Ÿ—ฃ๏ธ **Virtual assistants** that speak authentic Palestinian Arabic
- ๐ŸŽ“ **Educational tools** for learning and preserving the Palestinian dialect
- ๐ŸŽฌ **Content creation** for Palestinian media and storytelling

> **Dedicated to Palestine**: This model is a tribute to the resilience, culture, and spirit of the Palestinian people. May their voices be heard loud and clear across the world. ๐Ÿ‡ต๐Ÿ‡ธ

---

## ๐ŸŽฏ Key Features

- โœ… **High-quality voice cloning**: Clone any voice with just a few seconds of reference audio
- โœ… **Palestinian Arabic dialect**: Authentic pronunciation and intonation
- โœ… **Fast inference**: Optimized for real-time generation
- โœ… **Flexible context**: Supports variable-length reference audio
- โœ… **Open source**: Free to use and improve

---

## ๐Ÿ“Š Model Details

| **Attribute** | **Value** |
|---------------|-----------|
| **Model Type** | Text-to-Speech (TTS) |
| **Base Model** | YatharthS/MiraTTS |
| **Architecture** | Transformer-based Language Model + Audio Codec |
| **Training Language** | Palestinian Arabic (ar-PS) |
| **Dataset** | Private Dataset |
| **Sample Rate** | 16,000 Hz |
| **License** | Apache 2.0 |
| **Model Size** | ~0.6B parameters |
| **Precision** | BF16/FP32 |
| **Framework** | PyTorch + Transformers |

---

## ๐Ÿš€ Quick Start

### Installation

```bash
# Install required packages
uv pip install git+https://github.com/ysharma3501/MiraTTS.git
```

### Usage (Python)

```python
from mira.model import MiraTTS
from IPython.display import Audio
mira_tts = MiraTTS('hamdallah/Sofelia-TTS') ## downloads model from huggingface

file = "reference_file.wav" ## can be mp3/wav/ogg or anything that librosa supports
text = "ู…ุฑุญุจุงุŒ ูƒูŠู ุงู„ุญุงู„ุŸ ู‡ุฐุง ู†ู…ูˆุฐุฌ ู„ู„ู‡ุฌุฉ ุงู„ูู„ุณุทูŠู†ูŠุฉ."

context_tokens = mira_tts.encode_audio(file)
audio = mira_tts.generate(text, context_tokens)

Audio(audio, rate=48000)
```

---

## ๐ŸŽค Example Prompts

Try these Palestinian Arabic phrases:

```python
# Greetings
"ู…ุฑุญุจุงุŒ ูƒูŠู ุญุงู„ูƒุŸ"  # Hello, how are you?
"ุฃู‡ู„ุง ูˆุณู‡ู„ุง ููŠูƒ"      # Welcome

# Common expressions
"ูŠุง ุณู„ุงู…ุŒ ู‡ุฐุง ุฑุงุฆุน"   # Wow, this is amazing
"ู…ุง ุดุงุก ุงู„ู„ู‡"         # Mashallah
"ุงู„ู„ู‡ ูŠุนุทูŠูƒ ุงู„ุนุงููŠุฉ"  # God give you wellness

# About Palestine
"ูู„ุณุทูŠู† ุญุฑุฉ ุนู„ู‰ ุทูˆู„"  # Palestine is free for ever
"ุงู„ู‚ุฏุณ ุนุงุตู…ุฉ ูู„ุณุทูŠู† ุงู„ุฃุจุฏูŠุฉ"     # Jerusalem is the eternal capital of Palestine
"ุณู†ุนูˆุฏ ูŠูˆู…ุงู‹ ุฅู„ู‰ ุฏูŠุงุฑู†ุง"         # We will return one day to our homes
```

---

## ๐ŸŽ“ Training Details

### Training Data

- **Dataset**: 400 Hours Palestinian Speech
- **Language**: Palestinian Arabic dialect
- **Hours of audio**: High-quality Palestinian speech recordings
- **Preprocessing**: Audio normalized and resampled to 16kHz

### Training Configuration

| **Hyperparameter** | **Value** |
|--------------------|-----------|
| **Learning Rate** | 2e-4 (initial), 1e-5 (refinement) |
| **Batch Size** | 8 (effective: 2 per device ร— 4 accumulation steps) |
| **Training Steps** | 2000+ |
| **Warmup Steps** | 100 |
| **Max Audio Length** | 20-30 seconds |
| **Optimizer** | AdamW |
| **LR Scheduler** | Cosine with warmup |
| **Gradient Clipping** | 1.0 |
| **Precision** | BF16 (H100) / FP32 |
| **Hardware** | NVIDIA H100 / A100 GPU |

### Training Process

The model was trained using a two-phase approach:

1. **Foundation Phase**: High learning rate (2e-4) for initial adaptation to Palestinian Arabic
2. **Refinement Phase**: Lower learning rate (1e-5) with NEFTune noise for stability and quality

---

## ๐Ÿ“ˆ Model Performance

The model achieves:

- โœ… **Natural prosody** matching Palestinian Arabic speech patterns
- โœ… **Clear pronunciation** of Arabic phonemes
- โœ… **Voice similarity** to reference audio
- โœ… **Stable generation** without artifacts or repetitions
- โœ… **Fast inference** suitable for real-time applications

---

## ๐Ÿ› ๏ธ Advanced Usage

### Running the model using batching

```python
file = "reference_file.wav" ## can be mp3/wav/ogg or anything that librosa supports
text = ["ู…ุฑุญุจุงุŒ ูƒูŠู ุญุงู„ูƒุŸ", "ุจุชุนุฑู ุฅู†ู‡ ุงู†ุง ุจู‚ุฏุฑ ุงุญูƒูŠ ูู„ุณุทูŠู†ูŠ ูˆ English ู…ุน ุจุนุถ Without Errors."]

context_tokens = [mira_tts.encode_audio(file)]

audio = mira_tts.batch_generate(text, context_tokens)

Audio(audio, rate=48000)
```

### Adjusting Generation Parameters

```python
# More creative/variable output

mira_tts.set_params(
    top_p=0.95, 
    top_k=20, 
    temperature=0.01, # Higher = more variation
    max_new_tokens=1024, 
    repetition_penalty=2.2, 
    min_p=0.05
)

```

---

## ๐Ÿ’ก Tips for Best Results

1. **Reference Audio Quality**:
   - Use clean audio without background noise
   - 3-10 seconds of speech is ideal
   - Ensure audio is 16kHz sample rate

2. **Text Input**:
   - Use proper Arabic script (not Arabizi/transliteration)
   - Palestinian dialect works best
   - Avoid very long sentences (split into shorter segments)

3. **Generation Parameters**:
   - `temperature=0.7`: Good default for natural speech
   - `temperature=0.5`: More stable, less variation
   - `temperature=0.9`: More expressive, more variation

---

## ๐ŸŒ About Palestinian Arabic

Palestinian Arabic is a Levantine Arabic dialect spoken by the Palestinian people. It has unique characteristics:

- **Phonology**: Preservation of Classical Arabic /q/ as glottal stop [ส”]
- **Vocabulary**: Rich in Levantine and unique Palestinian terms
- **Intonation**: Distinctive melodic patterns
- **Regional Variants**: Urban (Jerusalem, Hebron) vs. Rural vs. Bedouin varieties

This model captures these linguistic features, making it authentic and representative of Palestinian speech.

---

## ๐Ÿ‡ต๐Ÿ‡ธ Message of Solidarity

This model is dedicated to the Palestinian people and their enduring struggle for freedom, dignity, and justice. Through technology, we preserve and celebrate Palestinian culture, language, and identity.

**Free Palestine** ๐Ÿ‡ต๐Ÿ‡ธ

> *"We will not be erased. Our voices will echo through time, in every language model, every algorithm, every line of code. Palestine lives, and so does its voice."*

---

## ๐Ÿ“œ License

This model is released under the **Apache 2.0 License**, making it free for:
- โœ… Commercial use
- โœ… Modification and distribution
- โœ… Private use
- โœ… Patent use

---

## ๐Ÿ™ Acknowledgments

- **Base Model**: [YatharthS/MiraTTS](https://huggingface.co/YatharthS/MiraTTS) - Thank you for the excellent foundation
- **Dataset**: Palestinian Arabic speakers who contributed their voices
- **Community**: The open-source AI community for tools and support
- **Palestine**: For being the inspiration and purpose behind this work

---

## ๐Ÿ“ž Contact & Support

- **Model Repository**: [hamdallah/Sofelia-TTS](https://huggingface.co/hamdallah/Sofelia-TTS)
- **Issues & Questions**: Use the Community tab or open an issue

---

## ๐Ÿ”— Related Resources

- [YatharthS/MiraTTS](https://huggingface.co/YatharthS/MiraTTS) - Base model
- [ncodec](https://github.com/YatharthS/ncodec) - Audio codec library

---

## ๐Ÿ“š Citation

If you use this model in your research or projects, please cite:

```bibtex
@misc{sofelia-tts-2026,
  author = {Hamdallah},
  title = {Sofelia-TTS: Palestinian Arabic Text-to-Speech Model},
  year = {2026},
  publisher = {Hugging Face},
  journal = {Hugging Face Model Hub},
  howpublished = {\url{https://huggingface.co/hamdallah/Sofelia-TTS}},
}
```

---

<div style="text-align: center; padding: 20px;">
  <h2>๐Ÿ‡ต๐Ÿ‡ธ FREE PALESTINE ๐Ÿ‡ต๐Ÿ‡ธ</h2>
  <p><strong>ุชุญูŠุง ูู„ุณุทูŠู† ุญุฑุฉ ุฃุจูŠุฉ</strong></p>
  <p><em>Long Live Free Palestine</em></p>
  <p>๐Ÿ•Š๏ธ โœŠ ๐Ÿ‡ต๐Ÿ‡ธ</p>
</div>

---

**Made with โค๏ธ for Palestine**