Update app.py
Browse files
app.py
CHANGED
@@ -71,7 +71,10 @@ async def generate_audio_with_voice_prefix(text_segment, default_voice, rate, pi
|
|
71 |
voice7_short = voice7_full.split(" - ")[0]
|
72 |
voice8_full = "vi-VN-NamMinhNeural - vi-VN (Male)" #Vietnamese
|
73 |
voice8_short = voice8_full.split(" - ")[0]
|
74 |
-
|
|
|
|
|
|
|
75 |
|
76 |
if processed_text.startswith("1F"):
|
77 |
current_voice_short = voice1F_short
|
@@ -107,12 +110,20 @@ async def generate_audio_with_voice_prefix(text_segment, default_voice, rate, pi
|
|
107 |
current_voice_short = voice6_short
|
108 |
processed_text = processed_text[2:].strip()
|
109 |
|
110 |
-
elif processed_text.startswith("
|
111 |
-
current_voice_short =
|
112 |
processed_text = processed_text[2:].strip()
|
113 |
-
elif processed_text.startswith("
|
114 |
current_voice_short = voice8_short
|
115 |
processed_text = processed_text[2:].strip()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
if processed_text:
|
118 |
rate_str = f"{current_rate:+d}%"
|
|
|
71 |
voice7_short = voice7_full.split(" - ")[0]
|
72 |
voice8_full = "vi-VN-NamMinhNeural - vi-VN (Male)" #Vietnamese
|
73 |
voice8_short = voice8_full.split(" - ")[0]
|
74 |
+
voice9F_full = "de-DE-SeraphinaMultilingualNeural - de-DE (Female)" #Vietnamese
|
75 |
+
voice9F_short = voice7_full.split(" - ")[0]
|
76 |
+
voice9_full = "ko-KR-HyunsuMultilingualNeural - ko-KR (Male)" #Vietnamese
|
77 |
+
voice9_short = voice8_full.split(" - ")[0]
|
78 |
|
79 |
if processed_text.startswith("1F"):
|
80 |
current_voice_short = voice1F_short
|
|
|
110 |
current_voice_short = voice6_short
|
111 |
processed_text = processed_text[2:].strip()
|
112 |
|
113 |
+
elif processed_text.startswith("1V"): #Female VN
|
114 |
+
current_voice_short = voice7_short
|
115 |
processed_text = processed_text[2:].strip()
|
116 |
+
elif processed_text.startswith("2V"):
|
117 |
current_voice_short = voice8_short
|
118 |
processed_text = processed_text[2:].strip()
|
119 |
+
elif processed_text.startswith("3V"): #Female VN
|
120 |
+
current_voice_short = voice9F_short
|
121 |
+
current_pitch = 25
|
122 |
+
processed_text = processed_text[2:].strip()
|
123 |
+
elif processed_text.startswith("4V"):
|
124 |
+
current_voice_short = voice9_short
|
125 |
+
current_pitch = -20
|
126 |
+
processed_text = processed_text[2:].strip()
|
127 |
|
128 |
if processed_text:
|
129 |
rate_str = f"{current_rate:+d}%"
|