Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ system_prompt = '''
|
|
25 |
...
|
26 |
}
|
27 |
}
|
28 |
-
#Please note that the [string] you generate now must be in
|
29 |
#Be concise. No less than five rounds of conversation.
|
30 |
'''
|
31 |
|
@@ -108,7 +108,7 @@ async def gen_show(script):
|
|
108 |
for key, text in content.items():
|
109 |
speaker = key.split('_')[0] # Extract the speaker name
|
110 |
index = key.split('_')[1] # Extract the dialogue index
|
111 |
-
voice = "zh-
|
112 |
|
113 |
# Create temporary file for each speaker's dialogue
|
114 |
temp_file = tempfile.NamedTemporaryFile(suffix='.mp3', delete=False)
|
|
|
25 |
...
|
26 |
}
|
27 |
}
|
28 |
+
#Please note that the [string] you generate now must be in relaxed and natural Chinese.
|
29 |
#Be concise. No less than five rounds of conversation.
|
30 |
'''
|
31 |
|
|
|
108 |
for key, text in content.items():
|
109 |
speaker = key.split('_')[0] # Extract the speaker name
|
110 |
index = key.split('_')[1] # Extract the dialogue index
|
111 |
+
voice = "zh-CN-XiaoxiaoNeural" if speaker == "Chen" else "zh-CN-YunyangNeural"
|
112 |
|
113 |
# Create temporary file for each speaker's dialogue
|
114 |
temp_file = tempfile.NamedTemporaryFile(suffix='.mp3', delete=False)
|