Update README.md
#2
by Nada2 - opened
README.md
CHANGED
|
@@ -1,75 +1,172 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
pipeline_tag: text-to-speech
|
| 4 |
language:
|
| 5 |
-
- ar
|
| 6 |
-
- zh
|
| 7 |
-
- en
|
| 8 |
-
- ja
|
| 9 |
-
- ko
|
| 10 |
-
- de
|
| 11 |
-
- fr
|
| 12 |
-
- ru
|
| 13 |
-
- pt
|
| 14 |
-
- es
|
| 15 |
-
- it
|
| 16 |
tags:
|
| 17 |
-
- audio
|
| 18 |
-
- tts
|
| 19 |
-
- voice-clone
|
|
|
|
|
|
|
| 20 |
base_model:
|
| 21 |
-
- Qwen/Qwen3-TTS-12Hz-0.6B-Base
|
| 22 |
---
|
| 23 |
|
| 24 |
<p align="center">
|
| 25 |
-
<img src="logo.jpg" alt="A3S Logo" width="400"
|
| 26 |
</p>
|
| 27 |
|
| 28 |
-
# A3S โ
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|---|---|
|
| 36 |
-
| **Saudi Arabic** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/AR-Sa.wav"></audio> |
|
| 37 |
-
| **Emirati Arabic** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/AR-uae.wav"></audio> |
|
| 38 |
| **Modern Standard Arabic (MSA)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/AR.wav"></audio> |
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
| Language | Audio Sample |
|
| 43 |
|---|---|
|
| 44 |
-
| **English** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/English.wav"></audio> |
|
| 45 |
-
| **Chinese** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Chinese.wav"></audio> |
|
| 46 |
-
| **Japanese** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Japanese.wav"></audio> |
|
| 47 |
-
| **Korean** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/korean.wav"></audio> |
|
| 48 |
-
| **German** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/German.wav"></audio> |
|
| 49 |
-
| **French** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/French.wav"></audio> |
|
| 50 |
-
| **Russian** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Russian.wav"></audio> |
|
| 51 |
-
| **Portuguese** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Portuguese.wav"></audio> |
|
| 52 |
-
| **Spanish** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Spanish.wav"></audio> |
|
| 53 |
-
| **Italian** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Italian.wav"></audio> |
|
| 54 |
|
| 55 |
---
|
| 56 |
|
| 57 |
-
##
|
| 58 |
|
| 59 |
-
Try
|
| 60 |
|
| 61 |
[](https://colab.research.google.com/drive/1QGViKk_b38jqDyzp6MBuSZrFcZ9ILI6Q?usp=sharing)
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
| Model | Model Size | TTFC (Time to First Chunk) | TTFA (Time to First Audio) | RTF (Real-Time Factor) | Generation Speed | Total Latency (3.8s Audio) |
|
| 67 |
| :--- | :---: | :--- | :--- | :--- | :--- | :--- |
|
| 68 |
-
| **A3S** | 0.6B | ~60 ms | 200
|
| 69 |
-
| **OmniVoice
|
| 70 |
-
| **Higgs** | 4B | ~60 ms | 356
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
---
|
| 3 |
license: apache-2.0
|
| 4 |
pipeline_tag: text-to-speech
|
| 5 |
language:
|
| 6 |
+
- ar
|
| 7 |
+
- zh
|
| 8 |
+
- en
|
| 9 |
+
- ja
|
| 10 |
+
- ko
|
| 11 |
+
- de
|
| 12 |
+
- fr
|
| 13 |
+
- ru
|
| 14 |
+
- pt
|
| 15 |
+
- es
|
| 16 |
+
- it
|
| 17 |
tags:
|
| 18 |
+
- audio
|
| 19 |
+
- tts
|
| 20 |
+
- voice-clone
|
| 21 |
+
- multilingual-tts
|
| 22 |
+
- arabic-tts
|
| 23 |
base_model:
|
| 24 |
+
- Qwen/Qwen3-TTS-12Hz-0.6B-Base
|
| 25 |
---
|
| 26 |
|
| 27 |
<p align="center">
|
| 28 |
+
<img src="logo.jpg" alt="A3S Logo" width="400" height="600"/>
|
| 29 |
</p>
|
| 30 |
|
| 31 |
+
# A3S โ Multilingual Text-to-Speech
|
| 32 |
|
| 33 |
+
**A3S** is a multilingual Text-to-Speech (TTS) model based on **Qwen3-TTS-12Hz-0.6B-Base**, supporting **11 languages** and **3 Arabic speakers**.
|
| 34 |
|
| 35 |
+
Arabic speech generation supports **3 dialects**:
|
| 36 |
|
| 37 |
+
- ๐ธ๐ฆ Saudi Arabic (Saudi Arabia)
|
| 38 |
+
- ๐ฆ๐ช Emirati Arabic (United Arab Emirates)
|
| 39 |
+
- ๐ Modern Standard Arabic (MSA)
|
| 40 |
+
|
| 41 |
+
**Available Arabic Speakers**
|
| 42 |
+
|
| 43 |
+
Omar
|
| 44 |
+
|
| 45 |
+
Hanouf
|
| 46 |
+
|
| 47 |
+
Fahad
|
| 48 |
+
|
| 49 |
+
Speaker selection is performed using the `speaker` parameter during inference.
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
## Arabic Voice Samples
|
| 54 |
+
|
| 55 |
+
Listen to the model's Arabic speech generation across different dialects.
|
| 56 |
+
|
| 57 |
+
| Language / Dialect | Audio Sample |
|
| 58 |
|---|---|
|
| 59 |
+
| **Saudi Arabic (Saudi Arabia)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/AR-Sa.wav"></audio> |
|
| 60 |
+
| **Emirati Arabic (United Arab Emirates)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/AR-uae.wav"></audio> |
|
| 61 |
| **Modern Standard Arabic (MSA)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/AR.wav"></audio> |
|
| 62 |
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## ๐ Multilingual Voice Samples
|
| 66 |
+
|
| 67 |
+
A3S supports speech generation in the following 11 languages.
|
| 68 |
|
| 69 |
| Language | Audio Sample |
|
| 70 |
|---|---|
|
| 71 |
+
| **English (English)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/English.wav"></audio> |
|
| 72 |
+
| **Chinese (Mandarin Chinese)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Chinese.wav"></audio> |
|
| 73 |
+
| **Japanese (Japanese)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Japanese.wav"></audio> |
|
| 74 |
+
| **Korean (Korean)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/korean.wav"></audio> |
|
| 75 |
+
| **German (German)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/German.wav"></audio> |
|
| 76 |
+
| **French (French)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/French.wav"></audio> |
|
| 77 |
+
| **Russian (Russian)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Russian.wav"></audio> |
|
| 78 |
+
| **Portuguese (Portuguese)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Portuguese.wav"></audio> |
|
| 79 |
+
| **Spanish (Spanish)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Spanish.wav"></audio> |
|
| 80 |
+
| **Italian (Italian)** | <audio controls src="https://huggingface.co/MahmoudIbrahim/A3S/resolve/main/samples/Italian.wav"></audio> |
|
| 81 |
|
| 82 |
---
|
| 83 |
|
| 84 |
+
## Quick Start
|
| 85 |
|
| 86 |
+
Try A3S directly in Google Colab:
|
| 87 |
|
| 88 |
[](https://colab.research.google.com/drive/1QGViKk_b38jqDyzp6MBuSZrFcZ9ILI6Q?usp=sharing)
|
| 89 |
|
| 90 |
+
### Installation
|
| 91 |
+
|
| 92 |
+
Install the required dependencies:
|
| 93 |
+
|
| 94 |
+
```bash
|
| 95 |
+
pip install qwen_tts soundfile
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
For Ubuntu or Google Colab:
|
| 99 |
+
|
| 100 |
+
```bash
|
| 101 |
+
apt-get update && apt-get install -y sox libsox-fmt-all
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
**Optional: FlashAttention 2**
|
| 105 |
+
|
| 106 |
+
For compatible NVIDIA GPUs (Ampere or newer):
|
| 107 |
|
| 108 |
+
```bash
|
| 109 |
+
pip install flash-attn --no-build-isolation
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
FlashAttention is optional and requires a compatible CUDA environment.
|
| 113 |
+
|
| 114 |
+
### Load the Model
|
| 115 |
+
|
| 116 |
+
```python
|
| 117 |
+
import torch
|
| 118 |
+
import soundfile as sf
|
| 119 |
+
from qwen_tts import Qwen3TTSModel
|
| 120 |
+
from transformers import logging as hf_logging
|
| 121 |
+
from IPython.display import Audio, display
|
| 122 |
+
|
| 123 |
+
hf_logging.set_verbosity_error()
|
| 124 |
+
|
| 125 |
+
device = "cuda:0"
|
| 126 |
+
|
| 127 |
+
tts = Qwen3TTSModel.from_pretrained(
|
| 128 |
+
"MahmoudIbrahim/A3S",
|
| 129 |
+
device_map=device,
|
| 130 |
+
dtype=torch.bfloat16,
|
| 131 |
+
# attn_implementation="flash_attention_2",
|
| 132 |
+
)
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
### Generate Speech
|
| 136 |
+
|
| 137 |
+
```python
|
| 138 |
+
wavs, sr = tts.generate_custom_voice(
|
| 139 |
+
text="ูุด ุนููู
ูุ ุทุงู ุนู
ุฑู ููุช ู
ุณุฑุน ูู
ุณุชุนุฌู ุจุฑูุญ ุงูุฏูุงู
ุ ุจุณ ุงูุฒุญู
ุฉ ูุฏุช ุญูููุง ูุชุฃุฎุฑุช ุดููุ ูููุช ุนูู ุงูุทุงูุฑ ุฃุฎุฐุช ูู ูููุฉ ููู
ูุช ููู
ู.",
|
| 140 |
+
speaker="hanouf",
|
| 141 |
+
temperature=0.7,
|
| 142 |
+
subtalker_temperature=0.3
|
| 143 |
+
)
|
| 144 |
+
|
| 145 |
+
sf.write("output.wav", wavs[0], sr)
|
| 146 |
+
|
| 147 |
+
display(Audio("output.wav"))
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
**Available speakers:** `omar`, `hanouf`, `fahad`
|
| 151 |
+
|
| 152 |
+
Change the `speaker` parameter to select a different voice.
|
| 153 |
+
|
| 154 |
+
---
|
| 155 |
+
|
| 156 |
+
## Model Performance Comparison (NVIDIA A10 GPU)
|
| 157 |
+
|
| 158 |
+
The following table presents reported inference performance for A3S and other TTS models.
|
| 159 |
|
| 160 |
| Model | Model Size | TTFC (Time to First Chunk) | TTFA (Time to First Audio) | RTF (Real-Time Factor) | Generation Speed | Total Latency (3.8s Audio) |
|
| 161 |
| :--- | :---: | :--- | :--- | :--- | :--- | :--- |
|
| 162 |
+
| **A3S** | 0.6B | ~60 ms | 200โ400 ms | ~0.18 (5.5x faster) | ~110+ tokens/sec | ~650 ms |
|
| 163 |
+
| **OmniVoice (Non-Streaming)** | 0.6B | ~1,410 ms | ~1,410 ms | ~0.37 (2.7x faster) | N/A | ~1,410 ms |
|
| 164 |
+
| **Higgs** | 4B | ~60 ms | 356โ550 ms | ~0.70 (1.43x faster) | ~39.3 tokens/sec | ~2,692 ms |
|
| 165 |
+
|
| 166 |
+
---
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
## Authors & Collaborators
|
| 170 |
+
|
| 171 |
+
- [Nada Saeed Mohamed](https://www.linkedin.com/in/nada-saeed-mohamed-8b5a96216/) โ Collaborator
|
| 172 |
+
- [Mahmoud Ibrahim](https://www.linkedin.com/in/mahmoud-ibrahim-93a376258/) โ Collaborator
|