Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -144,6 +144,13 @@ HTML_CONTENT = """
|
|
| 144 |
Antonio
|
| 145 |
</label>
|
| 146 |
<label class="voice-option">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
<input type="radio" name="voice" value="pt-BR-FranciscaNeural">
|
| 148 |
Francisca
|
| 149 |
</label>
|
|
@@ -152,9 +159,12 @@ HTML_CONTENT = """
|
|
| 152 |
Thalita
|
| 153 |
</label>
|
| 154 |
<label class="voice-option">
|
| 155 |
-
<input type="radio" name="voice" value="en-US-
|
| 156 |
-
|
| 157 |
</label>
|
|
|
|
|
|
|
|
|
|
| 158 |
</div>
|
| 159 |
</div>
|
| 160 |
|
|
@@ -225,7 +235,7 @@ async def read_root():
|
|
| 225 |
async def synthesize_speech(request_data: dict):
|
| 226 |
try:
|
| 227 |
text = request_data.get("text", "")
|
| 228 |
-
voice = request_data.get("voice", "pt-BR-
|
| 229 |
|
| 230 |
output_file = f"temp_{hash(text + voice)}.mp3"
|
| 231 |
|
|
|
|
| 144 |
Antonio
|
| 145 |
</label>
|
| 146 |
<label class="voice-option">
|
| 147 |
+
<input type="radio" name="voice" value="en-US-AndrewMultilingualNeural" checked>
|
| 148 |
+
Andrew Multilingual
|
| 149 |
+
</label>
|
| 150 |
+
<label class="voice-option">
|
| 151 |
+
<input type="radio" name="voice" value="en-US-BrianMultilingualNeural" checked>
|
| 152 |
+
Brian Multilingual
|
| 153 |
+
</label>
|
| 154 |
<input type="radio" name="voice" value="pt-BR-FranciscaNeural">
|
| 155 |
Francisca
|
| 156 |
</label>
|
|
|
|
| 159 |
Thalita
|
| 160 |
</label>
|
| 161 |
<label class="voice-option">
|
| 162 |
+
<input type="radio" name="voice" value="en-US-AvaMultilingualNeural">
|
| 163 |
+
Ava Multilingual
|
| 164 |
</label>
|
| 165 |
+
<label class="voice-option">
|
| 166 |
+
<input type="radio" name="voice" value="en-US-EmmaMultilingualNeural">
|
| 167 |
+
Emma Multilingual
|
| 168 |
</div>
|
| 169 |
</div>
|
| 170 |
|
|
|
|
| 235 |
async def synthesize_speech(request_data: dict):
|
| 236 |
try:
|
| 237 |
text = request_data.get("text", "")
|
| 238 |
+
voice = request_data.get("voice", "pt-BR-AntonioNeural")
|
| 239 |
|
| 240 |
output_file = f"temp_{hash(text + voice)}.mp3"
|
| 241 |
|