ulysses115 commited on
Commit
600a24f
·
1 Parent(s): 5201e3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -17
app.py CHANGED
@@ -56,6 +56,7 @@ def vc_fn(sid, audio_record, audio_upload, tran, pndm_speedup=20):
56
  # Show the spinner and run the run_clip function inside the 'with' block
57
  f0_tst, f0_pred, audio = run_clip(svc_model, file_path=audio_path, key=key, acc=pndm_speedup, use_crepe=True, use_pe=True, thre=0.1,
58
  use_gt_mel=False, add_noise_step=500, project_name=project_name, out_path=wav_gen)
 
59
  audio, sr = librosa.load(wav_gen)
60
  f0_gen,_=get_pitch_parselmouth(*svc_model.vocoder.wav2spec(wav_gen),hparams)
61
  f0_tst[f0_tst==0]=np.nan#ground truth f0
@@ -80,13 +81,11 @@ with app:
80
  with gr.Tabs():
81
  with gr.TabItem("Basic"):
82
  gr.Markdown(value="""
83
- 本模型为sovits_f0(含AI猫雷2.0音色),支持**60s以内**的**无伴奏**wav、mp3(单声道)格式,或使用**网页内置**的录音(二选一)
84
-
85
- 转换效果取决于源音频语气、节奏是否与目标音色相近,以及音域是否超出目标音色音域范围
86
 
87
- 猫雷音色低音音域效果不佳,如转换男声歌声,建议变调升 **6-10key**
88
 
89
- 该模型的 [github仓库链接](https://github.com/innnky/so-vits-svc),如果想自己制作并训练模型可以访问这个 [github仓库](https://github.com/IceKyrin/sovits_guide)
90
  """)
91
  speaker_id = gr.Dropdown(label="音色", choices=['雷电将军'], value="雷电将军")
92
  record_input = gr.Audio(source="microphone", label="录制你的声音", type="filepath", elem_id="audio_inputs")
@@ -97,7 +96,7 @@ with app:
97
  vc_submit = gr.Button("转换", variant="primary")
98
  out_audio = gr.Audio(label="Output Audio")
99
  gr.Markdown(value="""
100
- 输出信息为音高平均偏差半音数量,体现转换音频的跑调情况(一般平均小于0.5个半音)
101
  """)
102
  out_message = gr.Textbox(label="Output")
103
  gr.Markdown(value="""f0曲线可以直观的显示跑调情况,蓝色为输入音高,橙色为合成音频的音高
@@ -106,16 +105,5 @@ with app:
106
  f0_image = gr.Image(label="f0曲线")
107
  vc_submit.click(vc_fn, [speaker_id, record_input, upload_input, vc_transform, vc_speedup],
108
  [out_message, out_audio, f0_image])
109
- with gr.TabItem("使用说明"):
110
- gr.Markdown(value="""
111
- 0、合集:https://github.com/IceKyrin/sovits_guide/blob/main/README.md
112
- 1、仅支持sovit_f0(sovits2.0)模型
113
- 2、自行下载hubert-soft-0d54a1f4.pt改名为hubert.pt放置于pth文件夹下(已经下好了)
114
- https://github.com/bshall/hubert/releases/tag/v0.1
115
- 3、pth文件夹下放置sovits2.0的模型
116
- 4、与模型配套的xxx.json,需有speaker项——人物列表
117
- 5、放无伴奏的音频、或网页内置录音,不要放奇奇怪怪的格式
118
- 6、仅供交流使用,不对用户行为负责
119
- """)
120
 
121
  app.launch()
 
56
  # Show the spinner and run the run_clip function inside the 'with' block
57
  f0_tst, f0_pred, audio = run_clip(svc_model, file_path=audio_path, key=key, acc=pndm_speedup, use_crepe=True, use_pe=True, thre=0.1,
58
  use_gt_mel=False, add_noise_step=500, project_name=project_name, out_path=wav_gen)
59
+
60
  audio, sr = librosa.load(wav_gen)
61
  f0_gen,_=get_pitch_parselmouth(*svc_model.vocoder.wav2spec(wav_gen),hparams)
62
  f0_tst[f0_tst==0]=np.nan#ground truth f0
 
81
  with gr.Tabs():
82
  with gr.TabItem("Basic"):
83
  gr.Markdown(value="""
84
+ 本模型基于diffsvc训练,使用雷电将军语音数据,模型与数据都来源于[Erythrocyte/Diff-SVC_Genshin_Datasets](https://huggingface.co/datasets/Erythrocyte/Diff-SVC_Genshin_Datasets),
 
 
85
 
86
+ 本页面支持**60s以内**的**无伴奏**wav格式,或使用**网页内置**的录音(二选一)
87
 
88
+ 转换效果取决于源音频语气、节奏是否与目标音色相近,以及音域是否超出目标音色音域范围
89
  """)
90
  speaker_id = gr.Dropdown(label="音色", choices=['雷电将军'], value="雷电将军")
91
  record_input = gr.Audio(source="microphone", label="录制你的声音", type="filepath", elem_id="audio_inputs")
 
96
  vc_submit = gr.Button("转换", variant="primary")
97
  out_audio = gr.Audio(label="Output Audio")
98
  gr.Markdown(value="""
99
+ 无用信息
100
  """)
101
  out_message = gr.Textbox(label="Output")
102
  gr.Markdown(value="""f0曲线可以直观的显示跑调情况,蓝色为输入音高,橙色为合成音频的音高
 
105
  f0_image = gr.Image(label="f0曲线")
106
  vc_submit.click(vc_fn, [speaker_id, record_input, upload_input, vc_transform, vc_speedup],
107
  [out_message, out_audio, f0_image])
 
 
 
 
 
 
 
 
 
 
 
108
 
109
  app.launch()