Mahiruoshi commited on
Commit
d01dfc5
·
1 Parent(s): 67acc22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -105,7 +105,8 @@ def chatgpt(text):
105
  messages[6:10] = messages[8:]
106
  del messages[-2:]
107
  with open('log.pickle', 'wb') as f:
108
- pickle.dump(messages, f)
 
109
  return reply,messages
110
  except:
111
  messages.append({"role": "user", "content": text},)
@@ -265,9 +266,10 @@ if __name__ == '__main__':
265
  "# <center>Seisho-Nijigasaki vits-models with chatgpt support\n"
266
  "# <center>少歌&&虹团vits\n"
267
  "## <center> Please do not generate content that could infringe upon the rights or cause harm to individuals or organizations.\n"
268
- "## <center> 请不要生成会对个人以及企划造成侵害的内容\n"
269
- "## <center> 自带chatgpt支持,长句分割支持,srt字幕生成,可修改音频生成路径至live2d语音路径,建议本机使用。\n"
270
- "## <center> 现已结束训练,包含lovelive虹团与少歌四校的部分角色。数据集版权归官方所有,严禁商用及恶意使用"
 
271
  )
272
  with gr.Tabs():
273
  for i in schools:
@@ -291,8 +293,8 @@ if __name__ == '__main__':
291
  output1 = gr.Audio(label="采样率22050")
292
  with gr.Accordion(label="Setting(TTS)", open=False):
293
  input2 = gr.Dropdown(label="Language", choices=lan, value="自动", interactive=True)
294
- input4 = gr.Slider(minimum=0, maximum=1.0, label="更改噪声比例(noise scale),以控制情感", value=0.467)
295
- input5 = gr.Slider(minimum=0, maximum=1.0, label="更改噪声偏差(noise scale w),以控制音素长短", value=0.7)
296
  input6 = gr.Slider(minimum=0.1, maximum=10, label="duration", value=1)
297
  with gr.Accordion(label="Advanced Setting(GPT3.5接口+长句子合成,建议克隆本仓库后运行main.py)", open=False):
298
  input3 = gr.Checkbox(value=False, label="长句切割(小说合成)")
 
105
  messages[6:10] = messages[8:]
106
  del messages[-2:]
107
  with open('log.pickle', 'wb') as f:
108
+ messages2 = []
109
+ pickle.dump(messages2, f)
110
  return reply,messages
111
  except:
112
  messages.append({"role": "user", "content": text},)
 
266
  "# <center>Seisho-Nijigasaki vits-models with chatgpt support\n"
267
  "# <center>少歌&&虹团vits\n"
268
  "## <center> Please do not generate content that could infringe upon the rights or cause harm to individuals or organizations.\n"
269
+ "## <center> 现已结束训练,包含lovelive虹团与少歌四校的部分角色。数据集版权归官方所有,严禁商用及恶意使用"
270
+ "## <center> 请不要生成会对个人以及企划造成侵害,带有侮辱性的言论,自觉遵守相关法律 >>> http://www.cac.gov.cn/2023-04/11/c_1682854275475410.htm \n"
271
+ "## <center> 自带chatgpt支持,长句分割支持,srt字幕生成,可修改音频生成路径至live2d语音路径,建议本地使用。\n"
272
+
273
  )
274
  with gr.Tabs():
275
  for i in schools:
 
293
  output1 = gr.Audio(label="采样率22050")
294
  with gr.Accordion(label="Setting(TTS)", open=False):
295
  input2 = gr.Dropdown(label="Language", choices=lan, value="自动", interactive=True)
296
+ input4 = gr.Slider(minimum=0, maximum=1.0, label="更改噪声比例(noise scale),以控制情感", value=0.6)
297
+ input5 = gr.Slider(minimum=0, maximum=1.0, label="更改噪声偏差(noise scale w),以控制音素长短", value=0.668)
298
  input6 = gr.Slider(minimum=0.1, maximum=10, label="duration", value=1)
299
  with gr.Accordion(label="Advanced Setting(GPT3.5接口+长句子合成,建议克隆本仓库后运行main.py)", open=False):
300
  input3 = gr.Checkbox(value=False, label="长句切割(小说合成)")