KaixuanGuo commited on
Commit
16f3638
·
verified ·
1 Parent(s): 15db1d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -35,9 +35,9 @@ def generate_tts_custom(text, lang, speaker, model_size, model_name):
35
  # 经过分析,该模型的 predict 接口通常返回一个音频文件路径
36
  result = client_map[model_name].predict(
37
  text=text,
38
- language="English",
39
  speaker="Ryan",
40
- instruct="Hello!!",
41
  model_size="1.7B",
42
  api_name="/generate_custom_voice"
43
  )
@@ -58,7 +58,7 @@ def generate_voice_design(text, lang, instruct, model_name):
58
  # 2. 调用原模型的 API 接口
59
  # 经过分析,该模型的 predict 接口通常返回一个音频文件路径
60
  result = client_map[model_name].predict(
61
- text="Hello!",
62
  language="Auto",
63
  voice_description="Speak in an incredulous tone, but with a hint of panic beginning to creep into your voice.",
64
  api_name="/generate_voice_design"
@@ -105,7 +105,7 @@ def generate_podcast(text, s1_wav, s1_txt, s2_wav, s2_txt, lang, seed, model_nam
105
  # 2. 调用原模型的 API 接口
106
  # 经过分析,该模型的 predict 接口通常返回一个音频文件路径
107
  result = client_map[model_name].predict(
108
- target_text="[S1] 哈喽,AI时代的冲浪先锋们!欢迎! [S2] 欢迎啊!",
109
  spk1_prompt_text=s1_txt,
110
  spk1_prompt_audio=handle_file(s1_wav),
111
  spk1_dialect_prompt_text="",
@@ -216,7 +216,7 @@ def build_ui():
216
  label="Style Instruction / Voice Description",
217
  lines=18,
218
  placeholder="Describe voice style or custom voice...",
219
- value="Speak in an incredulous tone."
220
  )
221
 
222
  # --- 第二列:SPK1 Material ---
@@ -237,7 +237,7 @@ def build_ui():
237
  shared_text = gr.Textbox(
238
  label="Target Text / Script",
239
  lines=5,
240
- value="[S1] Hello! [S2] Hi there!"
241
  )
242
  with gr.Row():
243
  shared_language = gr.Dropdown(label="Language", choices=LANGUAGES, value="Auto")
 
35
  # 经过分析,该模型的 predict 接口通常返回一个音频文件路径
36
  result = client_map[model_name].predict(
37
  text=text,
38
+ language="Auto",
39
  speaker="Ryan",
40
+ instruct="",
41
  model_size="1.7B",
42
  api_name="/generate_custom_voice"
43
  )
 
58
  # 2. 调用原模型的 API 接口
59
  # 经过分析,该模型的 predict 接口通常返回一个音频文件路径
60
  result = client_map[model_name].predict(
61
+ text=text,
62
  language="Auto",
63
  voice_description="Speak in an incredulous tone, but with a hint of panic beginning to creep into your voice.",
64
  api_name="/generate_voice_design"
 
105
  # 2. 调用原模型的 API 接口
106
  # 经过分析,该模型的 predict 接口通常返回一个音频文件路径
107
  result = client_map[model_name].predict(
108
+ target_text=text,
109
  spk1_prompt_text=s1_txt,
110
  spk1_prompt_audio=handle_file(s1_wav),
111
  spk1_dialect_prompt_text="",
 
216
  label="Style Instruction / Voice Description",
217
  lines=18,
218
  placeholder="Describe voice style or custom voice...",
219
+ value="展现出悲苦沙哑的声音质感,语速偏慢,情绪浓烈且带有哭腔,以标准普通话缓慢诉说,情感强烈,语调哀怨高亢,音高起伏大。"
220
  )
221
 
222
  # --- 第二列:SPK1 Material ---
 
237
  shared_text = gr.Textbox(
238
  label="Target Text / Script",
239
  lines=5,
240
+ value=""[S1] 哈喽,AI时代的冲浪先锋们!欢迎! [S2] 欢迎啊!""
241
  )
242
  with gr.Row():
243
  shared_language = gr.Dropdown(label="Language", choices=LANGUAGES, value="Auto")