Nephele commited on
Commit
ff3b347
1 Parent(s): 5478222

push_231015231752_rebuild

Browse files
MODELS/{Arasaka.pth → TERRA.pth} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:55bdc20685b241804e1995a6ba313ac0ea19165923d8b15e0183798be4b5409e
3
  size 629528157
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa400e907a126dc17d4eaca412f9ca7832844ea0964c8319b01dc99610ce13e1
3
  size 629528157
MODELS/TEST.pth DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:40711cfa3677b681a6d7ba55a5f8ad3c0bccd1dd376732b45c08d769d05adfca
3
- size 857912255
 
 
 
 
MODELS/endlessstar.pth DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6940ed126fb9f8d76737736b6d6f3affc26edb3a205a7f2baa0dc312df182b7e
3
- size 629528157
 
 
 
 
MODELS/lucid.pth DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:87e8108e882ed9a58327055127ac29ca9740dca59c706de00e30726634098f8e
3
- size 629528157
 
 
 
 
MODELS/{nikki9400.pth → nikki.pth} RENAMED
File without changes
MODELS/take2.pth DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:659a8f3887e007e2917fe8a42902cc88ef82d0b852b04178d3a0f2ef0a704d10
3
- size 629528157
 
 
 
 
MODELS/{BAD1100.pth → v3.pth} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ccd138e10a910bf44a5843561551e5ce8a5fae564cd29cdcbbe9beaa74714c4
3
  size 629528157
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9b3ec8e49f19a41ef6601a35d3cd5bed2f0a5fa3d7c90c064726206675aa746
3
  size 629528157
MODELS/vv.pth DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:04188ce0fa1308b7bab0e27800df6b96808a5c5d22cdd48c1ea6c17f01638a43
3
- size 629528157
 
 
 
 
app.py CHANGED
@@ -15,21 +15,16 @@ import pytz
15
  tz = pytz.timezone('Asia/Shanghai')
16
  net_g = None
17
  models = {
18
- "MistyNikki": "./MODELS/nikki9400.pth",
19
  "AlluWin": "./MODELS/AW.pth",
20
- "Silverleg": "./MODELS/J8900.pth",
21
- "Umemura": "./MODELS/take2.pth",
22
- "LucidMoon": "./MODELS/lucid.pth",
23
  "Rrabbitt": "./MODELS/rabbit4900.pth",
24
- "VivaciousViolet": "./MODELS/vv.pth",
25
  "PremJ": "./MODELS/premj.pth",
26
- "ImmenseStar": "./MODELS/endlessstar.pth",
27
- "LightHammer": "./MODELS/hammer.pth",
28
- "ArasakaAI": "./MODELS/Arasaka.pth",
29
- "DLM": "./MODELS/DLM.pth",
30
- "BadGirlDLM": "./MODELS/BG1300.pth",
31
- "BadBoyDLM": "./MODELS/BAD1100.pth",
32
-
33
  }
34
 
35
  def get_text(text, language_str, hps):
@@ -124,14 +119,14 @@ if __name__ == "__main__":
124
  with gr.Column():
125
 
126
  gr.Markdown('''
127
- **仅供测试用** \nThese models can only speak Chinese for now.
128
  ''')
129
  text = gr.TextArea(label="输入需要生成语音的文字", placeholder="输入文字",
130
  value="在不在?能不能借给我三百块钱买可乐",
131
- info="使用huggingface的免费CPU进行推理,因此速度不快,一次性不要输入超过500汉字。字数越多,生成速度越慢,请耐心等待,只会说中文。"
132
  ,
133
  )
134
- model = gr.Radio(choices=list(models.keys()), value=list(models.keys())[0], label='音声模型')
135
  with gr.Accordion(label="展开设置生成参数", open=False):
136
  sdp_ratio = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.01, label='SDP/DP混合比',info='可控制一定程度的语调变化')
137
  noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.5, step=0.01, label='感情变化')
@@ -140,8 +135,8 @@ if __name__ == "__main__":
140
  btn = gr.Button("✨生成", variant="primary")
141
  with gr.Column():
142
  audio_output = gr.Audio(label="试听")
143
- MP3_output = gr.File(label="下载")
144
- text_output = gr.Textbox(label="调试信息")
145
  gr.Markdown("""
146
 
147
  """)
@@ -150,6 +145,22 @@ if __name__ == "__main__":
150
  inputs=[text, sdp_ratio, noise_scale, noise_scale_w, length_scale, model],
151
  outputs=[text_output, audio_output,MP3_output]
152
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  gr.HTML('''<div align=center><img id="visitor-badge" alt="visitor badge" src="https://visitor-badge.laobi.icu/badge?page_id=nepheTTS" /></div>''')
154
  app.launch(show_error=True)
155
 
 
15
  tz = pytz.timezone('Asia/Shanghai')
16
  net_g = None
17
  models = {
18
+ "MistyNikki": "./MODELS/nikki.pth",
19
  "AlluWin": "./MODELS/AW.pth",
20
+ "VVV":"./MODELS/v3.pth",
21
+ "StayTerra": "./MODELS/TERRA.pth",
 
22
  "Rrabbitt": "./MODELS/rabbit4900.pth",
23
+ "Silverleg": "./MODELS/J8900.pth",
24
  "PremJ": "./MODELS/premj.pth",
25
+ "Robo!Girl": "./MODELS/BG1300.pth",
26
+ "HeavyHammer": "./MODELS/hammer.pth",
27
+ "TaxiAI": "./MODELS/DLM.pth",
 
 
 
 
28
  }
29
 
30
  def get_text(text, language_str, hps):
 
119
  with gr.Column():
120
 
121
  gr.Markdown('''
122
+ **仅供测试用** These models only speak Chinese for now.
123
  ''')
124
  text = gr.TextArea(label="输入需要生成语音的文字", placeholder="输入文字",
125
  value="在不在?能不能借给我三百块钱买可乐",
126
+ info="使用huggingface的免费CPU进行推理,因此速度不快,一次性不要输入超过500字。字数越多,生成速度越慢,请耐心等待,只会说中文。"
127
  ,
128
  )
129
+ model = gr.Radio(choices=list(models.keys()), value=list(models.keys())[0], label='选择音声模型')
130
  with gr.Accordion(label="展开设置生成参数", open=False):
131
  sdp_ratio = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.01, label='SDP/DP混合比',info='可控制一定程度的语调变化')
132
  noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.5, step=0.01, label='感情变化')
 
135
  btn = gr.Button("✨生成", variant="primary")
136
  with gr.Column():
137
  audio_output = gr.Audio(label="试听")
138
+ MP3_output = gr.File(label="💾下载")
139
+ text_output = gr.Textbox(label="❗调试信息")
140
  gr.Markdown("""
141
 
142
  """)
 
145
  inputs=[text, sdp_ratio, noise_scale, noise_scale_w, length_scale, model],
146
  outputs=[text_output, audio_output,MP3_output]
147
  )
148
+ gr.Examples(
149
+ examples=[
150
+ [
151
+ "啊?又在外面加班吗?真是的"
152
+ ],
153
+ [
154
+ "但对我来说,回忆中的那座城反而笼罩在一种暖暖淡淡的,有奶油质感的颜色中。"
155
+ ],
156
+ [
157
+ "与我打卡过的其他几家社区图书馆一样,环境那叫一个整洁优雅,工作日那叫一个人烟稀少。书虽不多,但好书不少,而且崭新得烫手。"
158
+ ],
159
+ [
160
+ "对小朋友来说或许有点幼稚,但对我来说刚刚好!"
161
+ ],
162
+ ],
163
+ inputs=[text],
164
  gr.HTML('''<div align=center><img id="visitor-badge" alt="visitor badge" src="https://visitor-badge.laobi.icu/badge?page_id=nepheTTS" /></div>''')
165
  app.launch(show_error=True)
166