Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ async def get_voices():
|
|
13 |
|
14 |
# Text-to-speech function for a single paragraph
|
15 |
async def paragraph_to_speech(text, voice, rate, pitch):
|
16 |
-
voice1 = "en-
|
17 |
voice2 = "en-HK-YanNeural - en-HK (Female)"
|
18 |
if not text.strip():
|
19 |
return None
|
@@ -21,7 +21,7 @@ async def paragraph_to_speech(text, voice, rate, pitch):
|
|
21 |
text2 = text[2:] # Remove the first two characters ("FF")
|
22 |
voice_short_name =voice2.split(" - ")[0]
|
23 |
else:
|
24 |
-
voice_short_name =
|
25 |
text2=text
|
26 |
rate_str = f"{rate:+d}%"
|
27 |
pitch_str = f"{pitch:+d}Hz"
|
|
|
13 |
|
14 |
# Text-to-speech function for a single paragraph
|
15 |
async def paragraph_to_speech(text, voice, rate, pitch):
|
16 |
+
voice1 = "en-AU-WilliamNeural - en-AU (Male)"
|
17 |
voice2 = "en-HK-YanNeural - en-HK (Female)"
|
18 |
if not text.strip():
|
19 |
return None
|
|
|
21 |
text2 = text[2:] # Remove the first two characters ("FF")
|
22 |
voice_short_name =voice2.split(" - ")[0]
|
23 |
else:
|
24 |
+
voice_short_name = voice1.split(" - ")[0]
|
25 |
text2=text
|
26 |
rate_str = f"{rate:+d}%"
|
27 |
pitch_str = f"{pitch:+d}Hz"
|