mzltest commited on
Commit
4f38701
·
1 Parent(s): 3336b57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,7 +41,7 @@ class YukieGradio:
41
  self.inAudio = gr.Audio(label="上传音频")
42
  self.needLogmmse = gr.Checkbox(label="是否使用自带降噪")
43
  self.slice_db = gr.Slider(label="切片阈值(较嘈杂时-30,保留呼吸声时-50,一般默认-40)",
44
- maximum=32767, minimum=-32768, step=0.1, value=-40)
45
  self.vcTransform = gr.Number(
46
  label="升降调(整数,可以正负,半音数量,升高八度就是12)", value=0)
47
  self.vcSubmit = gr.Button("转换", variant="primary")
@@ -83,7 +83,7 @@ def downloadTubeUpload(query):
83
  # Step 2: Find the first video with duration less than 10 minutes and extract its ID
84
  video_id = None
85
  for item in search_response:
86
- duration = item.get("duration")
87
  if duration and int(duration.split(':')[0]) < 1 and int(duration.split(':')[1])<10:
88
  video_id = item.get("id", {}).get("videoId")
89
  break
 
41
  self.inAudio = gr.Audio(label="上传音频")
42
  self.needLogmmse = gr.Checkbox(label="是否使用自带降噪")
43
  self.slice_db = gr.Slider(label="切片阈值(较嘈杂时-30,保留呼吸声时-50,一般默认-40)",
44
+ maximum=0, minimum=-60, step=0.1, value=-40)
45
  self.vcTransform = gr.Number(
46
  label="升降调(整数,可以正负,半音数量,升高八度就是12)", value=0)
47
  self.vcSubmit = gr.Button("转换", variant="primary")
 
83
  # Step 2: Find the first video with duration less than 10 minutes and extract its ID
84
  video_id = None
85
  for item in search_response:
86
+ duration = item.get("duration_raw")
87
  if duration and int(duration.split(':')[0]) < 1 and int(duration.split(':')[1])<10:
88
  video_id = item.get("id", {}).get("videoId")
89
  break