PlotweaverModel commited on
Commit
8a1df72
·
verified ·
1 Parent(s): a7ec219

Delete languages.py

Browse files
Files changed (1) hide show
  1. languages.py +0 -279
languages.py DELETED
@@ -1,279 +0,0 @@
1
- """
2
- Language configuration for PlotWeaver.
3
- Three TTS/translation engines:
4
- 1. "qwen" — Qwen 3.5 Omni (end-to-end speech-to-speech, best for global languages)
5
- 2. "yourvoic" — YourVoic API (TTS only, paired with NLLB MT)
6
- 3. "local" — Local MMS-TTS on GPU (for Yoruba, Hausa, etc.), paired with NLLB MT
7
- """
8
-
9
- # Qwen Omni voices (work across all Qwen-supported languages)
10
- QWEN_VOICES = [
11
- "Cherry", "Serena", "Ethan", "Chelsie", "Momo", "Vivian", "Moon", "Maia",
12
- "Kai", "Nofish", "Bella", "Jennifer", "Ryan", "Katerina", "Aiden",
13
- "Eldric Sage", "Mia", "Mochi", "Bellona", "Vincent", "Bunny", "Neil",
14
- "Elias", "Arthur", "Seren", "Bodega", "Sonrisa", "Alek", "Dolce",
15
- "Sohee", "Ono Anna", "Lenn", "Emilien", "Andre",
16
- ]
17
-
18
- # Each language entry:
19
- # "Display Name": {
20
- # "nllb": NLLB-200 language code (for local/yourvoic pipeline translation),
21
- # "yourvoic_lang": YourVoic language code (or None),
22
- # "yourvoic_voices": list of YourVoic voice names,
23
- # "tts_engine": "qwen" | "yourvoic" | "local",
24
- # "qwen_code": short language code for Qwen prompts (or None),
25
- # "qwen_name": full language name for Qwen system prompt (or None),
26
- # }
27
-
28
- LANGUAGES = {
29
- # ---- Global Languages (Qwen Omni — best quality) ----
30
- "Arabic": {
31
- "nllb": "arb_Arab", "yourvoic_lang": "ar-SA",
32
- "yourvoic_voices": ["Peter"], "tts_engine": "qwen",
33
- "qwen_code": "ar", "qwen_name": "Modern Standard Arabic (العربية الفصحى)",
34
- },
35
- "Spanish": {
36
- "nllb": "spa_Latn", "yourvoic_lang": "es-ES",
37
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
38
- "qwen_code": "es", "qwen_name": "Spanish",
39
- },
40
- "French": {
41
- "nllb": "fra_Latn", "yourvoic_lang": "fr-FR",
42
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
43
- "qwen_code": "fr", "qwen_name": "French",
44
- },
45
- "German": {
46
- "nllb": "deu_Latn", "yourvoic_lang": "de-DE",
47
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
48
- "qwen_code": "de", "qwen_name": "German",
49
- },
50
- "Mandarin": {
51
- "nllb": "zho_Hans", "yourvoic_lang": "zh-CN",
52
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
53
- "qwen_code": "zh", "qwen_name": "Mandarin Chinese",
54
- },
55
- "Italian": {
56
- "nllb": "ita_Latn", "yourvoic_lang": "it-IT",
57
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
58
- "qwen_code": "it", "qwen_name": "Italian",
59
- },
60
- "Japanese": {
61
- "nllb": "jpn_Jpan", "yourvoic_lang": "ja-JP",
62
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
63
- "qwen_code": "ja", "qwen_name": "Japanese",
64
- },
65
- "Portuguese": {
66
- "nllb": "por_Latn", "yourvoic_lang": "pt-BR",
67
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
68
- "qwen_code": "pt", "qwen_name": "Portuguese",
69
- },
70
- "Hindi": {
71
- "nllb": "hin_Deva", "yourvoic_lang": "hi-IN",
72
- "yourvoic_voices": ["Rahul", "Deepika", "Aditya"], "tts_engine": "qwen",
73
- "qwen_code": "hi", "qwen_name": "Hindi",
74
- },
75
- "Korean": {
76
- "nllb": "kor_Hang", "yourvoic_lang": "ko-KR",
77
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
78
- "qwen_code": "ko", "qwen_name": "Korean",
79
- },
80
- "Russian": {
81
- "nllb": "rus_Cyrl", "yourvoic_lang": "ru-RU",
82
- "yourvoic_voices": ["Peter", "Kylie"], "tts_engine": "qwen",
83
- "qwen_code": "ru", "qwen_name": "Russian",
84
- },
85
-
86
- # ---- African Languages (Local pipeline: Whisper → NLLB → MMS-TTS) ----
87
- "Yoruba": {
88
- "nllb": "yor_Latn", "yourvoic_lang": None,
89
- "yourvoic_voices": [], "tts_engine": "local",
90
- "qwen_code": None, "qwen_name": None,
91
- },
92
- "Hausa": {
93
- "nllb": "hau_Latn", "yourvoic_lang": None,
94
- "yourvoic_voices": [], "tts_engine": "local",
95
- "qwen_code": None, "qwen_name": None,
96
- },
97
- "Igbo": {
98
- "nllb": "ibo_Latn", "yourvoic_lang": None,
99
- "yourvoic_voices": [], "tts_engine": "local",
100
- "qwen_code": None, "qwen_name": None,
101
- },
102
- "Swahili": {
103
- "nllb": "swh_Latn", "yourvoic_lang": "sw-KE",
104
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
105
- "qwen_code": None, "qwen_name": None,
106
- },
107
- "Zulu": {
108
- "nllb": "zul_Latn", "yourvoic_lang": None,
109
- "yourvoic_voices": [], "tts_engine": "local",
110
- "qwen_code": None, "qwen_name": None,
111
- },
112
- "Amharic": {
113
- "nllb": "amh_Ethi", "yourvoic_lang": "am-ET",
114
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
115
- "qwen_code": None, "qwen_name": None,
116
- },
117
- "Afrikaans": {
118
- "nllb": "afr_Latn", "yourvoic_lang": "af-ZA",
119
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
120
- "qwen_code": None, "qwen_name": None,
121
- },
122
-
123
- # ---- South Asian (YourVoic TTS + NLLB MT) ----
124
- "Bengali": {
125
- "nllb": "ben_Beng", "yourvoic_lang": "bn-IN",
126
- "yourvoic_voices": ["Sneha", "Aryan"], "tts_engine": "yourvoic",
127
- "qwen_code": None, "qwen_name": None,
128
- },
129
- "Tamil": {
130
- "nllb": "tam_Taml", "yourvoic_lang": "ta-IN",
131
- "yourvoic_voices": ["Priya", "Kumar"], "tts_engine": "yourvoic",
132
- "qwen_code": None, "qwen_name": None,
133
- },
134
- "Telugu": {
135
- "nllb": "tel_Telu", "yourvoic_lang": "te-IN",
136
- "yourvoic_voices": ["Arjun", "Lakshmi"], "tts_engine": "yourvoic",
137
- "qwen_code": None, "qwen_name": None,
138
- },
139
- "Marathi": {
140
- "nllb": "mar_Deva", "yourvoic_lang": "mr-IN",
141
- "yourvoic_voices": ["Anjali", "Rohan"], "tts_engine": "yourvoic",
142
- "qwen_code": None, "qwen_name": None,
143
- },
144
- "Urdu": {
145
- "nllb": "urd_Arab", "yourvoic_lang": "ur-PK",
146
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
147
- "qwen_code": None, "qwen_name": None,
148
- },
149
- "Nepali": {
150
- "nllb": "npi_Deva", "yourvoic_lang": "ne-NP",
151
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
152
- "qwen_code": None, "qwen_name": None,
153
- },
154
-
155
- # ---- Southeast Asian (YourVoic) ----
156
- "Indonesian": {
157
- "nllb": "ind_Latn", "yourvoic_lang": "id-ID",
158
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
159
- "qwen_code": None, "qwen_name": None,
160
- },
161
- "Vietnamese": {
162
- "nllb": "vie_Latn", "yourvoic_lang": "vi-VN",
163
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
164
- "qwen_code": None, "qwen_name": None,
165
- },
166
- "Thai": {
167
- "nllb": "tha_Thai", "yourvoic_lang": "th-TH",
168
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
169
- "qwen_code": None, "qwen_name": None,
170
- },
171
- "Malay": {
172
- "nllb": "zsm_Latn", "yourvoic_lang": "ms-MY",
173
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
174
- "qwen_code": None, "qwen_name": None,
175
- },
176
- "Filipino": {
177
- "nllb": "tgl_Latn", "yourvoic_lang": "fil-PH",
178
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
179
- "qwen_code": None, "qwen_name": None,
180
- },
181
-
182
- # ---- European (YourVoic) ----
183
- "Dutch": {
184
- "nllb": "nld_Latn", "yourvoic_lang": "nl-NL",
185
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
186
- "qwen_code": None, "qwen_name": None,
187
- },
188
- "Polish": {
189
- "nllb": "pol_Latn", "yourvoic_lang": "pl-PL",
190
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
191
- "qwen_code": None, "qwen_name": None,
192
- },
193
- "Turkish": {
194
- "nllb": "tur_Latn", "yourvoic_lang": "tr-TR",
195
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
196
- "qwen_code": None, "qwen_name": None,
197
- },
198
- "Swedish": {
199
- "nllb": "swe_Latn", "yourvoic_lang": "sv-SE",
200
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
201
- "qwen_code": None, "qwen_name": None,
202
- },
203
- "Romanian": {
204
- "nllb": "ron_Latn", "yourvoic_lang": "ro-RO",
205
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
206
- "qwen_code": None, "qwen_name": None,
207
- },
208
- "Greek": {
209
- "nllb": "ell_Grek", "yourvoic_lang": "el-GR",
210
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
211
- "qwen_code": None, "qwen_name": None,
212
- },
213
- "Ukrainian": {
214
- "nllb": "ukr_Cyrl", "yourvoic_lang": "uk-UA",
215
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
216
- "qwen_code": None, "qwen_name": None,
217
- },
218
- "Finnish": {
219
- "nllb": "fin_Latn", "yourvoic_lang": "fi-FI",
220
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
221
- "qwen_code": None, "qwen_name": None,
222
- },
223
- "Danish": {
224
- "nllb": "dan_Latn", "yourvoic_lang": "da-DK",
225
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
226
- "qwen_code": None, "qwen_name": None,
227
- },
228
- "Norwegian": {
229
- "nllb": "nob_Latn", "yourvoic_lang": "nb-NO",
230
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
231
- "qwen_code": None, "qwen_name": None,
232
- },
233
-
234
- # ---- Middle Eastern (YourVoic) ----
235
- "Persian": {
236
- "nllb": "pes_Arab", "yourvoic_lang": "fa-IR",
237
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
238
- "qwen_code": None, "qwen_name": None,
239
- },
240
- "Hebrew": {
241
- "nllb": "heb_Hebr", "yourvoic_lang": "he-IL",
242
- "yourvoic_voices": ["Peter"], "tts_engine": "yourvoic",
243
- "qwen_code": None, "qwen_name": None,
244
- },
245
- }
246
-
247
-
248
- # Group languages by category for the UI
249
- LANGUAGE_GROUPS = {
250
- "Global Languages": [
251
- "Spanish", "French", "German", "Mandarin", "Italian",
252
- "Japanese", "Portuguese", "Hindi", "Arabic", "Korean", "Russian",
253
- ],
254
- "African Languages": [
255
- "Yoruba", "Hausa", "Igbo", "Swahili", "Zulu", "Amharic", "Afrikaans",
256
- ],
257
- "South Asian": [
258
- "Bengali", "Tamil", "Telugu", "Marathi", "Urdu", "Nepali",
259
- ],
260
- "Southeast Asian": [
261
- "Indonesian", "Vietnamese", "Thai", "Malay", "Filipino",
262
- ],
263
- "European": [
264
- "Dutch", "Polish", "Turkish", "Swedish", "Romanian",
265
- "Greek", "Ukrainian", "Finnish", "Danish", "Norwegian",
266
- ],
267
- "Middle Eastern": [
268
- "Persian", "Hebrew",
269
- ],
270
- }
271
-
272
- # All language display names (for dropdowns)
273
- ALL_LANGUAGE_NAMES = sorted(LANGUAGES.keys())
274
-
275
- # Languages that use local TTS (your fine-tuned models)
276
- LOCAL_TTS_LANGUAGES = [k for k, v in LANGUAGES.items() if v["tts_engine"] == "local"]
277
-
278
- # Languages that use YourVoic API
279
- YOURVOIC_LANGUAGES = [k for k, v in LANGUAGES.items() if v["tts_engine"] == "yourvoic"]