Spaces:
Sleeping
Sleeping
antoniomae1234
commited on
Commit
β’
cda679c
1
Parent(s):
7d66b83
Upload 4 files
Browse files- README.md +13 -0
- app.py +263 -0
- gitattributes +35 -0
- requirements.txt +4 -0
README.md
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Edge TTS
|
3 |
+
emoji: ππ£οΈ
|
4 |
+
colorFrom: green
|
5 |
+
colorTo: gray
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 4.19.2
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: openrail
|
11 |
+
---
|
12 |
+
|
13 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
ADDED
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import edge_tts
|
2 |
+
import gradio as gr
|
3 |
+
import tempfile
|
4 |
+
import anyio
|
5 |
+
|
6 |
+
|
7 |
+
language_dict = {
|
8 |
+
'English-Jenny (Female)': 'en-US-JennyNeural',
|
9 |
+
'English-Guy (Male)': 'en-US-GuyNeural',
|
10 |
+
'English-Ana (Female)': 'en-US-AnaNeural',
|
11 |
+
'English-Aria (Female)': 'en-US-AriaNeural',
|
12 |
+
'English-Christopher (Male)': 'en-US-ChristopherNeural',
|
13 |
+
'English-Eric (Male)': 'en-US-EricNeural',
|
14 |
+
'English-Michelle (Female)': 'en-US-MichelleNeural',
|
15 |
+
'English-Roger (Male)': 'en-US-RogerNeural',
|
16 |
+
'Spanish (Mexican)-Dalia (Female)': 'es-MX-DaliaNeural',
|
17 |
+
'Spanish (Mexican)-Jorge- (Male)': 'es-MX-JorgeNeural',
|
18 |
+
'Korean-Sun-Hi- (Female)': 'ko-KR-SunHiNeural',
|
19 |
+
'Korean-InJoon- (Male)': 'ko-KR-InJoonNeural',
|
20 |
+
'Thai-Premwadee- (Female)': 'th-TH-PremwadeeNeural',
|
21 |
+
'Thai-Niwat- (Male)': 'th-TH-NiwatNeural',
|
22 |
+
'Vietnamese-HoaiMy- (Female)': 'vi-VN-HoaiMyNeural',
|
23 |
+
'Vietnamese-NamMinh- (Male)': 'vi-VN-NamMinhNeural',
|
24 |
+
'Japanese-Nanami- (Female)': 'ja-JP-NanamiNeural',
|
25 |
+
'Japanese-Keita- (Male)': 'ja-JP-KeitaNeural',
|
26 |
+
'French-Denise- (Female)': 'fr-FR-DeniseNeural',
|
27 |
+
'French-Eloise- (Female)': 'fr-FR-EloiseNeural',
|
28 |
+
'French-Henri- (Male)': 'fr-FR-HenriNeural',
|
29 |
+
'Brazilian-Francisca- (Female)': 'pt-BR-FranciscaNeural',
|
30 |
+
'Brazilian-Antonio- (Male)': 'pt-BR-AntonioNeural',
|
31 |
+
'Indonesian-Ardi- (Male)': 'id-ID-ArdiNeural',
|
32 |
+
'Indonesian-Gadis- (Female)': 'id-ID-GadisNeural',
|
33 |
+
'Hebrew-Avri- (Male)': 'he-IL-AvriNeural',
|
34 |
+
'Hebrew-Hila- (Female)': 'he-IL-HilaNeural',
|
35 |
+
'Italian-Isabella- (Female)': 'it-IT-IsabellaNeural',
|
36 |
+
'Italian-Diego- (Male)': 'it-IT-DiegoNeural',
|
37 |
+
'Italian-Elsa- (Female)': 'it-IT-ElsaNeural',
|
38 |
+
'Dutch-Colette- (Female)': 'nl-NL-ColetteNeural',
|
39 |
+
'Dutch-Fenna- (Female)': 'nl-NL-FennaNeural',
|
40 |
+
'Dutch-Maarten- (Male)': 'nl-NL-MaartenNeural',
|
41 |
+
'Malese-Osman- (Male)': 'ms-MY-OsmanNeural',
|
42 |
+
'Malese-Yasmin- (Female)': 'ms-MY-YasminNeural',
|
43 |
+
'Norwegian-Pernille- (Female)': 'nb-NO-PernilleNeural',
|
44 |
+
'Norwegian-Finn- (Male)': 'nb-NO-FinnNeural',
|
45 |
+
'Swedish-Sofie- (Female)': 'sv-SE-SofieNeural',
|
46 |
+
'ArabicSwedish-Mattias- (Male)': 'sv-SE-MattiasNeural',
|
47 |
+
'Arabic-Hamed- (Male)': 'ar-SA-HamedNeural',
|
48 |
+
'Arabic-Zariyah- (Female)': 'ar-SA-ZariyahNeural',
|
49 |
+
'Greek-Athina- (Female)': 'el-GR-AthinaNeural',
|
50 |
+
'Greek-Nestoras- (Male)': 'el-GR-NestorasNeural',
|
51 |
+
'German-Katja- (Female)': 'de-DE-KatjaNeural',
|
52 |
+
'German-Amala- (Female)': 'de-DE-AmalaNeural',
|
53 |
+
'German-Conrad- (Male)': 'de-DE-ConradNeural',
|
54 |
+
'German-Killian- (Male)': 'de-DE-KillianNeural',
|
55 |
+
'Afrikaans-Adri- (Female)': 'af-ZA-AdriNeural',
|
56 |
+
'Afrikaans-Willem- (Male)': 'af-ZA-WillemNeural',
|
57 |
+
'Ethiopian-Ameha- (Male)': 'am-ET-AmehaNeural',
|
58 |
+
'Ethiopian-Mekdes- (Female)': 'am-ET-MekdesNeural',
|
59 |
+
'Arabic (UAD)-Fatima- (Female)': 'ar-AE-FatimaNeural',
|
60 |
+
'Arabic (UAD)-Hamdan- (Male)': 'ar-AE-HamdanNeural',
|
61 |
+
'Arabic (Bahrain)-Ali- (Male)': 'ar-BH-AliNeural',
|
62 |
+
'Arabic (Bahrain)-Laila- (Female)': 'ar-BH-LailaNeural',
|
63 |
+
'Arabic (Algeria)-Ismael- (Male)': 'ar-DZ-IsmaelNeural',
|
64 |
+
'Arabic (Egypt)-Salma- (Female)': 'ar-EG-SalmaNeural',
|
65 |
+
'Arabic (Egypt)-Shakir- (Male)': 'ar-EG-ShakirNeural',
|
66 |
+
'Arabic (Iraq)-Bassel- (Male)': 'ar-IQ-BasselNeural',
|
67 |
+
'Arabic (Iraq)-Rana- (Female)': 'ar-IQ-RanaNeural',
|
68 |
+
'Arabic (Jordan)-Sana- (Female)': 'ar-JO-SanaNeural',
|
69 |
+
'Arabic (Jordan)-Taim- (Male)': 'ar-JO-TaimNeural',
|
70 |
+
'Arabic (Kuwait)-Fahed- (Male)': 'ar-KW-FahedNeural',
|
71 |
+
'Arabic (Kuwait)-Noura- (Female)': 'ar-KW-NouraNeural',
|
72 |
+
'Arabic (Lebanon)-Layla- (Female)': 'ar-LB-LaylaNeural',
|
73 |
+
'Arabic (Lebanon)-Rami- (Male)': 'ar-LB-RamiNeural',
|
74 |
+
'Arabic (Libya)-Iman- (Female)': 'ar-LY-ImanNeural',
|
75 |
+
'Arabic (Libya)-Omar- (Male)': 'ar-LY-OmarNeural',
|
76 |
+
'Arabic (Morocco)-Jamal- (Male)': 'ar-MA-JamalNeural',
|
77 |
+
'Arabic (Morocco)-Mouna- (Female)': 'ar-MA-MounaNeural',
|
78 |
+
'Arabic (Oman)-Abdullah- (Male)': 'ar-OM-AbdullahNeural',
|
79 |
+
'Arabic (Oman)-Aysha- (Female)': 'ar-OM-AyshaNeural',
|
80 |
+
'Arabic (Qatar)-Amal- (Female)': 'ar-QA-AmalNeural',
|
81 |
+
'Arabic (Qatar)-Moaz- (Male)': 'ar-QA-MoazNeural',
|
82 |
+
'Arabic (Syrian Arab Republic)-Amany- (Female)': 'ar-SY-AmanyNeural',
|
83 |
+
'Arabic (Syrian Arab Republic)-Laith- (Male)': 'ar-SY-LaithNeural',
|
84 |
+
'Arabic (Tunisia)-Hedi- (Male)': 'ar-TN-HediNeural',
|
85 |
+
'Arabic (Tunisia)-Reem- (Female)': 'ar-TN-ReemNeural',
|
86 |
+
'Arabic (Yemen )-Maryam- (Female)': 'ar-YE-MaryamNeural',
|
87 |
+
'Arabic (Yemen )-Saleh- (Male)': 'ar-YE-SalehNeural',
|
88 |
+
'Azerbaijani-Babek- (Male)': 'az-AZ-BabekNeural',
|
89 |
+
'Azerbaijani-Banu- (Female)': 'az-AZ-BanuNeural',
|
90 |
+
'Bulgarian-Borislav- (Male)': 'bg-BG-BorislavNeural',
|
91 |
+
'Bulgarian-Kalina- (Female)': 'bg-BG-KalinaNeural',
|
92 |
+
'Bengali (Bangladesh)-Nabanita- (Female)': 'bn-BD-NabanitaNeural',
|
93 |
+
'Bengali (Bangladesh)-Pradeep- (Male)': 'bn-BD-PradeepNeural',
|
94 |
+
'Bengali (India)-Bashkar- (Male)': 'bn-IN-BashkarNeural',
|
95 |
+
'Bengali (India)-Tanishaa- (Female)': 'bn-IN-TanishaaNeural',
|
96 |
+
'Bosniak (Bosnia and Herzegovina)-Goran- (Male)': 'bs-BA-GoranNeural',
|
97 |
+
'Bosniak (Bosnia and Herzegovina)-Vesna- (Female)': 'bs-BA-VesnaNeural',
|
98 |
+
'Catalan (Spain)-Joana- (Female)': 'ca-ES-JoanaNeural',
|
99 |
+
'Catalan (Spain)-Enric- (Male)': 'ca-ES-EnricNeural',
|
100 |
+
'Czech (Czech Republic)-Antonin- (Male)': 'cs-CZ-AntoninNeural',
|
101 |
+
'Czech (Czech Republic)-Vlasta- (Female)': 'cs-CZ-VlastaNeural',
|
102 |
+
'Welsh (UK)-Aled- (Male)': 'cy-GB-AledNeural',
|
103 |
+
'Welsh (UK)-Nia- (Female)': 'cy-GB-NiaNeural',
|
104 |
+
'Danish (Denmark)-Christel- (Female)': 'da-DK-ChristelNeural',
|
105 |
+
'Danish (Denmark)-Jeppe- (Male)': 'da-DK-JeppeNeural',
|
106 |
+
'German (Austria)-Ingrid- (Female)': 'de-AT-IngridNeural',
|
107 |
+
'German (Austria)-Jonas- (Male)': 'de-AT-JonasNeural',
|
108 |
+
'German (Switzerland)-Jan- (Male)': 'de-CH-JanNeural',
|
109 |
+
'German (Switzerland)-Leni- (Female)': 'de-CH-LeniNeural',
|
110 |
+
'English (Australia)-Natasha- (Female)': 'en-AU-NatashaNeural',
|
111 |
+
'English (Australia)-William- (Male)': 'en-AU-WilliamNeural',
|
112 |
+
'English (Canada)-Clara- (Female)': 'en-CA-ClaraNeural',
|
113 |
+
'English (Canada)-Liam- (Male)': 'en-CA-LiamNeural',
|
114 |
+
'English (UK)-Libby- (Female)': 'en-GB-LibbyNeural',
|
115 |
+
'English (UK)-Maisie- (Female)': 'en-GB-MaisieNeural',
|
116 |
+
'English (UK)-Ryan- (Male)': 'en-GB-RyanNeural',
|
117 |
+
'English (UK)-Sonia- (Female)': 'en-GB-SoniaNeural',
|
118 |
+
'English (UK)-Thomas- (Male)': 'en-GB-ThomasNeural',
|
119 |
+
'English (Hong Kong)-Sam- (Male)': 'en-HK-SamNeural',
|
120 |
+
'English (Hong Kong)-Yan- (Female)': 'en-HK-YanNeural',
|
121 |
+
'English (Ireland)-Connor- (Male)': 'en-IE-ConnorNeural',
|
122 |
+
'English (Ireland)-Emily- (Female)': 'en-IE-EmilyNeural',
|
123 |
+
'English (India)-Neerja- (Female)': 'en-IN-NeerjaNeural',
|
124 |
+
'English (India)-Prabhat- (Male)': 'en-IN-PrabhatNeural',
|
125 |
+
'English (Kenya)-Asilia- (Female)': 'en-KE-AsiliaNeural',
|
126 |
+
'English (Kenya)-Chilemba- (Male)': 'en-KE-ChilembaNeural',
|
127 |
+
'English (Nigeria)-Abeo- (Male)': 'en-NG-AbeoNeural',
|
128 |
+
'English (Nigeria)-Ezinne- (Female)': 'en-NG-EzinneNeural',
|
129 |
+
'English (New Zealand)-Mitchell- (Male)': 'en-NZ-MitchellNeural',
|
130 |
+
'English (Philippines)-James- (Male)': 'en-PH-JamesNeural',
|
131 |
+
'English (Philippines)-Rosa- (Female)': 'en-PH-RosaNeural',
|
132 |
+
'English (Singapore)-Luna- (Female)': 'en-SG-LunaNeural',
|
133 |
+
'English (Singapore)-Wayne- (Male)': 'en-SG-WayneNeural',
|
134 |
+
'English (Tanzania)-Elimu- (Male)': 'en-TZ-ElimuNeural',
|
135 |
+
'English (Tanzania)-Imani- (Female)': 'en-TZ-ImaniNeural',
|
136 |
+
'English (South Africa)-Leah- (Female)': 'en-ZA-LeahNeural',
|
137 |
+
'English (South Africa)-Luke- (Male)': 'en-ZA-LukeNeural',
|
138 |
+
'Spanish (Argentina)-Elena- (Female)': 'es-AR-ElenaNeural',
|
139 |
+
'Spanish (Argentina)-Tomas- (Male)': 'es-AR-TomasNeural',
|
140 |
+
'Spanish (Bolivia)-Marcelo- (Male)': 'es-BO-MarceloNeural',
|
141 |
+
'Spanish (Bolivia)-Sofia- (Female)': 'es-BO-SofiaNeural',
|
142 |
+
'Spanish (Colombia)-Gonzalo- (Male)': 'es-CO-GonzaloNeural',
|
143 |
+
'Spanish (Colombia)-Salome- (Female)': 'es-CO-SalomeNeural',
|
144 |
+
'Spanish (Costa Rica)-Juan- (Male)': 'es-CR-JuanNeural',
|
145 |
+
'Spanish (Costa Rica)-Maria- (Female)': 'es-CR-MariaNeural',
|
146 |
+
'Spanish (Cuba)-Belkys- (Female)': 'es-CU-BelkysNeural',
|
147 |
+
'Spanish (Dominican Republic)-Emilio- (Male)': 'es-DO-EmilioNeural',
|
148 |
+
'Spanish (Dominican Republic)-Ramona- (Female)': 'es-DO-RamonaNeural',
|
149 |
+
'Spanish (Ecuador)-Andrea- (Female)': 'es-EC-AndreaNeural',
|
150 |
+
'Spanish (Ecuador)-Luis- (Male)': 'es-EC-LuisNeural',
|
151 |
+
'Spanish (Spain)-Alvaro- (Male)': 'es-ES-AlvaroNeural',
|
152 |
+
'Spanish (Spain)-Elvira- (Female)': 'es-ES-ElviraNeural',
|
153 |
+
'Spanish (Equatorial Guinea)-Teresa- (Female)': 'es-GQ-TeresaNeural',
|
154 |
+
'Spanish (Guatemala)-Andres- (Male)': 'es-GT-AndresNeural',
|
155 |
+
'Spanish (Guatemala)-Marta- (Female)': 'es-GT-MartaNeural',
|
156 |
+
'Spanish (Honduras)-Carlos- (Male)': 'es-HN-CarlosNeural',
|
157 |
+
'Spanish (Honduras)-Karla- (Female)': 'es-HN-KarlaNeural',
|
158 |
+
'Spanish (Nicaragua)-Federico- (Male)': 'es-NI-FedericoNeural',
|
159 |
+
'Spanish (Nicaragua)-Yolanda- (Female)': 'es-NI-YolandaNeural',
|
160 |
+
'Spanish (Panama)-Margarita- (Female)': 'es-PA-MargaritaNeural',
|
161 |
+
'Spanish (Panama)-Roberto- (Male)': 'es-PA-RobertoNeural',
|
162 |
+
'Spanish (Peru)-Alex- (Male)': 'es-PE-AlexNeural',
|
163 |
+
'Spanish (Peru)-Camila- (Female)': 'es-PE-CamilaNeural',
|
164 |
+
'Spanish (Puerto Rico)-Karina- (Female)': 'es-PR-KarinaNeural',
|
165 |
+
'Spanish (Puerto Rico)-Victor- (Male)': 'es-PR-VictorNeural',
|
166 |
+
'Spanish (Paraguay)-Mario- (Male)': 'es-PY-MarioNeural',
|
167 |
+
'Spanish (Paraguay)-Tania- (Female)': 'es-PY-TaniaNeural',
|
168 |
+
'Spanish (El Salvador)-Lorena- (Female)': 'es-SV-LorenaNeural',
|
169 |
+
'Spanish (El Salvador)-Rodrigo- (Male)': 'es-SV-RodrigoNeural',
|
170 |
+
'Spanish (United States)-Alonso- (Male)': 'es-US-AlonsoNeural',
|
171 |
+
'Spanish (United States)-Paloma- (Female)': 'es-US-PalomaNeural',
|
172 |
+
'Spanish (Uruguay)-Mateo- (Male)': 'es-UY-MateoNeural',
|
173 |
+
'Spanish (Uruguay)-Valentina- (Female)': 'es-UY-ValentinaNeural',
|
174 |
+
'Spanish (Venezuela)-Paola- (Female)': 'es-VE-PaolaNeural',
|
175 |
+
'Spanish (Venezuela)-Sebastian- (Male)': 'es-VE-SebastianNeural',
|
176 |
+
'Estonian (Estonia)-Anu- (Female)': 'et-EE-AnuNeural',
|
177 |
+
'Estonian (Estonia)-Kert- (Male)': 'et-EE-KertNeural',
|
178 |
+
'Persian (Iran)-Dilara- (Female)': 'fa-IR-DilaraNeural',
|
179 |
+
'Persian (Iran)-Farid- (Male)': 'fa-IR-FaridNeural',
|
180 |
+
'Finnish (Finland)-Harri- (Male)': 'fi-FI-HarriNeural',
|
181 |
+
'Finnish (Finland)-Noora- (Female)': 'fi-FI-NooraNeural',
|
182 |
+
'French (Belgium)-Charline- (Female)': 'fr-BE-CharlineNeural',
|
183 |
+
'French (Belgium)-Gerard- (Male)': 'fr-BE-GerardNeural',
|
184 |
+
'French (Canada)-Sylvie- (Female)': 'fr-CA-SylvieNeural',
|
185 |
+
'French (Canada)-Antoine- (Male)': 'fr-CA-AntoineNeural',
|
186 |
+
'French (Canada)-Jean- (Male)': 'fr-CA-JeanNeural',
|
187 |
+
'French (Switzerland)-Ariane- (Female)': 'fr-CH-ArianeNeural',
|
188 |
+
'French (Switzerland)-Fabrice- (Male)': 'fr-CH-FabriceNeural',
|
189 |
+
'Irish (Ireland)-Colm- (Male)': 'ga-IE-ColmNeural',
|
190 |
+
'Irish (Ireland)-Orla- (Female)': 'ga-IE-OrlaNeural',
|
191 |
+
'Galician (Spain)-Roi- (Male)': 'gl-ES-RoiNeural',
|
192 |
+
'Galician (Spain)-Sabela- (Female)': 'gl-ES-SabelaNeural',
|
193 |
+
'Gujarati (India)-Dhwani- (Female)': 'gu-IN-DhwaniNeural',
|
194 |
+
'Gujarati (India)-Niranjan- (Male)': 'gu-IN-NiranjanNeural',
|
195 |
+
'Hindi (India)-Madhur- (Male)': 'hi-IN-MadhurNeural',
|
196 |
+
'Hindi (India)-Swara- (Female)': 'hi-IN-SwaraNeural',
|
197 |
+
'Croatian (Croatia)-Gabrijela- (Female)': 'hr-HR-GabrijelaNeural',
|
198 |
+
'Croatian (Croatia)-Srecko- (Male)': 'hr-HR-SreckoNeural',
|
199 |
+
'Hungarian (Hungary)-Noemi- (Female)': 'hu-HU-NoemiNeural',
|
200 |
+
'Hungarian (Hungary)-Tamas- (Male)': 'hu-HU-TamasNeural',
|
201 |
+
'Icelandic (Iceland)-Gudrun- (Female)': 'is-IS-GudrunNeural',
|
202 |
+
'Icelandic (Iceland)-Gunnar- (Male)': 'is-IS-GunnarNeural',
|
203 |
+
'Javanese (Indonesia)-Dimas- (Male)': 'jv-ID-DimasNeural',
|
204 |
+
'Javanese (Indonesia)-Siti- (Female)': 'jv-ID-SitiNeural',
|
205 |
+
'Georgian (Georgia)-Eka- (Female)': 'ka-GE-EkaNeural',
|
206 |
+
'Georgian (Georgia)-Giorgi- (Male)': 'ka-GE-GiorgiNeural',
|
207 |
+
'Kazakh (Kazakhstan)-Aigul- (Female)': 'kk-KZ-AigulNeural',
|
208 |
+
'Kazakh (Kazakhstan)-Daulet- (Male)': 'kk-KZ-DauletNeural',
|
209 |
+
'Khmer (Cambodia)-Piseth- (Male)': 'km-KH-PisethNeural',
|
210 |
+
'Khmer (Cambodia)-Sreymom- (Female)': 'km-KH-SreymomNeural',
|
211 |
+
'Kannada (India)-Gagan- (Male)': 'kn-IN-GaganNeural',
|
212 |
+
'Kannada (India)-Sapna- (Female)': 'kn-IN-SapnaNeural',
|
213 |
+
'Lao (Laos)-Chanthavong- (Male)': 'lo-LA-ChanthavongNeural',
|
214 |
+
'Lao (Laos)-Keomany- (Female)': 'lo-LA-KeomanyNeural',
|
215 |
+
'Lithuanian (Lithuania)-Leonas- (Male)': 'lt-LT-LeonasNeural',
|
216 |
+
'Lithuanian (Lithuania)-Ona- (Female)': 'lt-LT-OnaNeural',
|
217 |
+
'Latvian (Latvia)-Everita- (Female)': 'lv-LV-EveritaNeural',
|
218 |
+
'Latvian (Latvia)-Nils- (Male)': 'lv-LV-NilsNeural',
|
219 |
+
'Macedonian (North Macedonia)-Aleksandar- (Male)': 'mk-MK-AleksandarNeural',
|
220 |
+
'Macedonian (North Macedonia)-Marija- (Female)': 'mk-MK-MarijaNeural',
|
221 |
+
'Malayalam (India)-Midhun- (Male)': 'ml-IN-MidhunNeural',
|
222 |
+
'Malayalam (India)-Sobhana- (Female)': 'ml-IN-SobhanaNeural',
|
223 |
+
'Mongolian (Mongolia)-Bataa- (Male)': 'mn-MN-BataaNeural',
|
224 |
+
'Mongolian (Mongolia)-Yesui- (Female)': 'mn-MN-YesuiNeural',
|
225 |
+
'Marathi (India)-Aarohi- (Female)': 'mr-IN-AarohiNeural',
|
226 |
+
'Marathi (India)-Manohar- (Male)': 'mr-IN-ManoharNeural',
|
227 |
+
'Maltese (Malta)-Grace- (Female)': 'mt-MT-GraceNeural',
|
228 |
+
'Maltese (Malta)-Joseph- (Male)': 'mt-MT-JosephNeural',
|
229 |
+
'Burmese (Myanmar)-Nilar- (Female)': 'my-MM-NilarNeural',
|
230 |
+
'Burmese (Myanmar)-Thiha- (Male)': 'my-MM-ThihaNeural',
|
231 |
+
'Nepali (Nepal)-Hemkala- (Female)': 'ne-NP-HemkalaNeural',
|
232 |
+
'Nepali (Nepal)-Sagar- (Male)': 'ne-NP-SagarNeural',
|
233 |
+
'Dutch (Belgium)-Arnaud- (Male)': 'nl-BE-ArnaudNeural',
|
234 |
+
'Dutch (Belgium)-Dena- (Female)': 'nl-BE-DenaNeural',
|
235 |
+
'Polish (Poland)-Marek- (Male)': 'pl-PL-MarekNeural',
|
236 |
+
'Polish (Poland)-Zofia- (Female)': 'pl-PL-ZofiaNeural',
|
237 |
+
'Pashto (Afghanistan)-Gul Nawaz- (Male)': 'ps-AF-Gul',
|
238 |
+
}
|
239 |
+
|
240 |
+
async def text_to_speech_edge(text, language_code):
|
241 |
+
voice = language_dict.get(language_code, "default_voice")
|
242 |
+
communicate = edge_tts.Communicate(text, voice)
|
243 |
+
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
244 |
+
tmp_path = tmp_file.name
|
245 |
+
await communicate.save(tmp_path)
|
246 |
+
return f"Speech synthesis completed for: {text}", tmp_path
|
247 |
+
|
248 |
+
input_text = gr.Textbox(lines=5, label="Input Text")
|
249 |
+
output_text = gr.Textbox(label="Output Text")
|
250 |
+
output_audio = gr.Audio(type="filepath", label="Exported Audio")
|
251 |
+
language = gr.Dropdown(choices=list(language_dict.keys()), label="Choose the Voice Model")
|
252 |
+
|
253 |
+
interface = gr.Interface(
|
254 |
+
fn=text_to_speech_edge,
|
255 |
+
inputs=[input_text, language],
|
256 |
+
outputs=[output_text, output_audio],
|
257 |
+
title="Edge TTS",
|
258 |
+
description="Microsoft Edge Text-To-Speech (Forked & Fixed Ilaria TTS)",
|
259 |
+
|
260 |
+
)
|
261 |
+
|
262 |
+
if __name__ == "__main__":
|
263 |
+
anyio.run(interface.launch, backend="asyncio")
|
gitattributes
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
edge-tts
|
2 |
+
audiosegment
|
3 |
+
scipy
|
4 |
+
librosa
|