chitsanfei commited on
Commit
2b351ba
·
verified ·
1 Parent(s): fe90bca

👻: try to modified this

Browse files
Files changed (1) hide show
  1. app.py +20 -18
app.py CHANGED
@@ -28,7 +28,7 @@ converter = BaseLoader(only_cpu=False, hubert_path=None, rmvpe_path=None)
28
 
29
  title = "<center><strong><font size='7'>RVC Emu Zero</font></strong></center>"
30
  description = "仅供学术使用!本项目运行在 ZeroGPU 上,修改自 r3gm/rvc_zero"
31
- theme = "aliabid94/new-theme"
32
 
33
  PITCH_ALGO_OPT = [
34
  "pm",
@@ -289,7 +289,7 @@ def run(
289
  audio_effects,
290
  ):
291
  if not audio_files:
292
- raise ValueError("The audio pls")
293
 
294
  if isinstance(audio_files, str):
295
  audio_files = [audio_files]
@@ -333,7 +333,7 @@ def run(
333
 
334
  def audio_conf():
335
  return gr.File(
336
- label="Audio files",
337
  file_count="multiple",
338
  type="filepath",
339
  container=True,
@@ -342,8 +342,9 @@ def audio_conf():
342
 
343
  def model_conf():
344
  return gr.File(
345
- label="Model file",
346
  type="filepath",
 
347
  height=130,
348
  )
349
 
@@ -352,7 +353,7 @@ def pitch_algo_conf():
352
  return gr.Dropdown(
353
  PITCH_ALGO_OPT,
354
  value=PITCH_ALGO_OPT[4],
355
- label="Pitch algorithm",
356
  visible=True,
357
  interactive=True,
358
  )
@@ -360,7 +361,7 @@ def pitch_algo_conf():
360
 
361
  def pitch_lvl_conf():
362
  return gr.Slider(
363
- label="Pitch level",
364
  minimum=-24,
365
  maximum=24,
366
  step=1,
@@ -372,8 +373,9 @@ def pitch_lvl_conf():
372
 
373
  def index_conf():
374
  return gr.File(
375
- label="Index file",
376
  type="filepath",
 
377
  height=130,
378
  )
379
 
@@ -382,7 +384,7 @@ def index_inf_conf():
382
  return gr.Slider(
383
  minimum=0,
384
  maximum=1,
385
- label="Index influence",
386
  value=0.75,
387
  )
388
 
@@ -391,7 +393,7 @@ def respiration_filter_conf():
391
  return gr.Slider(
392
  minimum=0,
393
  maximum=7,
394
- label="Respiration median filtering",
395
  value=3,
396
  step=1,
397
  interactive=True,
@@ -402,7 +404,7 @@ def envelope_ratio_conf():
402
  return gr.Slider(
403
  minimum=0,
404
  maximum=1,
405
- label="Envelope ratio",
406
  value=0.25,
407
  interactive=True,
408
  )
@@ -412,7 +414,7 @@ def consonant_protec_conf():
412
  return gr.Slider(
413
  minimum=0,
414
  maximum=0.5,
415
- label="Consonant breath protection",
416
  value=0.5,
417
  interactive=True,
418
  )
@@ -420,14 +422,14 @@ def consonant_protec_conf():
420
 
421
  def button_conf():
422
  return gr.Button(
423
- "Inference",
424
  variant="primary",
425
  )
426
 
427
 
428
  def output_conf():
429
  return gr.File(
430
- label="Result",
431
  file_count="multiple",
432
  interactive=False,
433
  )
@@ -454,7 +456,7 @@ def tts_voice_conf():
454
  def tts_text_conf():
455
  return gr.Textbox(
456
  value="",
457
- placeholder="Write the text here...",
458
  label="Text",
459
  visible=False,
460
  lines=3,
@@ -463,7 +465,7 @@ def tts_text_conf():
463
 
464
  def tts_button_conf():
465
  return gr.Button(
466
- "Process TTS",
467
  variant="secondary",
468
  visible=False,
469
  )
@@ -472,7 +474,7 @@ def tts_button_conf():
472
  def tts_play_conf():
473
  return gr.Checkbox(
474
  False,
475
- label="Play",
476
  # info="",
477
  container=False,
478
  visible=False,
@@ -492,7 +494,7 @@ def sound_gui():
492
  def denoise_conf():
493
  return gr.Checkbox(
494
  False,
495
- label="Denoise",
496
  # info="",
497
  container=False,
498
  visible=True,
@@ -502,7 +504,7 @@ def denoise_conf():
502
  def effects_conf():
503
  return gr.Checkbox(
504
  False,
505
- label="Reverb",
506
  # info="",
507
  container=False,
508
  visible=True,
 
28
 
29
  title = "<center><strong><font size='7'>RVC Emu Zero</font></strong></center>"
30
  description = "仅供学术使用!本项目运行在 ZeroGPU 上,修改自 r3gm/rvc_zero"
31
+ theme = "NoCrypt/miku"
32
 
33
  PITCH_ALGO_OPT = [
34
  "pm",
 
289
  audio_effects,
290
  ):
291
  if not audio_files:
292
+ raise ValueError("请上传音频文件")
293
 
294
  if isinstance(audio_files, str):
295
  audio_files = [audio_files]
 
333
 
334
  def audio_conf():
335
  return gr.File(
336
+ label="音频文件",
337
  file_count="multiple",
338
  type="filepath",
339
  container=True,
 
342
 
343
  def model_conf():
344
  return gr.File(
345
+ label="模型文件",
346
  type="filepath",
347
+ value="./emu_v2.pth",
348
  height=130,
349
  )
350
 
 
353
  return gr.Dropdown(
354
  PITCH_ALGO_OPT,
355
  value=PITCH_ALGO_OPT[4],
356
+ label="音调算法",
357
  visible=True,
358
  interactive=True,
359
  )
 
361
 
362
  def pitch_lvl_conf():
363
  return gr.Slider(
364
+ label="变音等级",
365
  minimum=-24,
366
  maximum=24,
367
  step=1,
 
373
 
374
  def index_conf():
375
  return gr.File(
376
+ label="索引文件",
377
  type="filepath",
378
+ value="./emu_v2.index",
379
  height=130,
380
  )
381
 
 
384
  return gr.Slider(
385
  minimum=0,
386
  maximum=1,
387
+ label="索引强度",
388
  value=0.75,
389
  )
390
 
 
393
  return gr.Slider(
394
  minimum=0,
395
  maximum=7,
396
+ label="呼吸中值过滤",
397
  value=3,
398
  step=1,
399
  interactive=True,
 
404
  return gr.Slider(
405
  minimum=0,
406
  maximum=1,
407
+ label="包络线使用比例",
408
  value=0.25,
409
  interactive=True,
410
  )
 
414
  return gr.Slider(
415
  minimum=0,
416
  maximum=0.5,
417
+ label="辅音呼吸保护",
418
  value=0.5,
419
  interactive=True,
420
  )
 
422
 
423
  def button_conf():
424
  return gr.Button(
425
+ "推理",
426
  variant="primary",
427
  )
428
 
429
 
430
  def output_conf():
431
  return gr.File(
432
+ label="结果",
433
  file_count="multiple",
434
  interactive=False,
435
  )
 
456
  def tts_text_conf():
457
  return gr.Textbox(
458
  value="",
459
+ placeholder="在这里输入文字...",
460
  label="Text",
461
  visible=False,
462
  lines=3,
 
465
 
466
  def tts_button_conf():
467
  return gr.Button(
468
+ "执行 TTS",
469
  variant="secondary",
470
  visible=False,
471
  )
 
474
  def tts_play_conf():
475
  return gr.Checkbox(
476
  False,
477
+ label="播放",
478
  # info="",
479
  container=False,
480
  visible=False,
 
494
  def denoise_conf():
495
  return gr.Checkbox(
496
  False,
497
+ label="降噪",
498
  # info="",
499
  container=False,
500
  visible=True,
 
504
  def effects_conf():
505
  return gr.Checkbox(
506
  False,
507
+ label="混响",
508
  # info="",
509
  container=False,
510
  visible=True,