Update README.md

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