cnph001 commited on
Commit
edc0872
·
verified ·
1 Parent(s): 555abcf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -67,6 +67,11 @@ async def generate_audio_with_voice_prefix(text_segment, default_voice, rate, pi
67
  voice5_short = voice5_full.split(" - ")[0]
68
  voice6_full = "en-GB-MaisieNeural - en-GB (Female)" #Child
69
  voice6_short = voice6_full.split(" - ")[0]
 
 
 
 
 
70
 
71
  if processed_text.startswith("1F"):
72
  current_voice_short = voice1F_short
@@ -101,7 +106,14 @@ async def generate_audio_with_voice_prefix(text_segment, default_voice, rate, pi
101
  elif processed_text.startswith("1C"): #Child voice
102
  current_voice_short = voice6_short
103
  processed_text = processed_text[2:].strip()
104
-
 
 
 
 
 
 
 
105
  if processed_text:
106
  rate_str = f"{current_rate:+d}%"
107
  pitch_str = f"{current_pitch:+d}Hz"
 
67
  voice5_short = voice5_full.split(" - ")[0]
68
  voice6_full = "en-GB-MaisieNeural - en-GB (Female)" #Child
69
  voice6_short = voice6_full.split(" - ")[0]
70
+ voice7_full = "vi-VN-HoaiMyNeural - vi-VN (Female)" #Vietnamese
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
 
106
  elif processed_text.startswith("1C"): #Child voice
107
  current_voice_short = voice6_short
108
  processed_text = processed_text[2:].strip()
109
+
110
+ elif processed_text.startswith("VF"):
111
+ current_voice_short = voic7_short
112
+ processed_text = processed_text[2:].strip()
113
+ elif processed_text.startswith("VM"):
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}%"
119
  pitch_str = f"{current_pitch:+d}Hz"