megaaziib commited on
Commit
ff10b64
1 Parent(s): 7b65f65

enabled youtube

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -33,13 +33,13 @@ audio_mode = []
33
  f0method_mode = []
34
  f0method_info = ""
35
  if limitation is True:
36
- audio_mode = ["Upload audio", "TTS Audio"]
37
  f0method_mode = ["pm", "crepe", "harvest"]
38
- f0method_info = "PM is fast, Crepe is good but it was extremely slow (Default: PM)"
39
  else:
40
  audio_mode = ["Upload audio", "Youtube", "TTS Audio"]
41
- f0method_mode = ["pm", "harvest", "crepe"]
42
- f0method_info = "PM is fast, Harvest is good at lower frequency but extremely slow, Crepe is good for higher notes. (Default: PM)"
43
  def create_vc_fn(model_title, tgt_sr, net_g, vc, if_f0, version, file_index):
44
  def vc_fn(
45
  vc_audio_mode,
@@ -63,7 +63,7 @@ def create_vc_fn(model_title, tgt_sr, net_g, vc, if_f0, version, file_index):
63
  return "You need to upload an audio", None
64
  sampling_rate, audio = vc_upload
65
  duration = audio.shape[0] / sampling_rate
66
- if duration > 330 and limitation:
67
  return "Please upload an audio file that is less than 1 minute.", None
68
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
69
  if len(audio.shape) > 1:
 
33
  f0method_mode = []
34
  f0method_info = ""
35
  if limitation is True:
36
+ audio_mode = ["Upload audio", "Youtube", "TTS Audio"]
37
  f0method_mode = ["pm", "crepe", "harvest"]
38
+ f0method_info = "PM is fast, Crepe or harvest is good but it was extremely slow (Default: PM)"
39
  else:
40
  audio_mode = ["Upload audio", "Youtube", "TTS Audio"]
41
+ f0method_mode = ["pm", "crepe", "harvest"]
42
+ f0method_info = "PM is fast, Crepe or harvest is good but it was extremely slow (Default: PM))"
43
  def create_vc_fn(model_title, tgt_sr, net_g, vc, if_f0, version, file_index):
44
  def vc_fn(
45
  vc_audio_mode,
 
63
  return "You need to upload an audio", None
64
  sampling_rate, audio = vc_upload
65
  duration = audio.shape[0] / sampling_rate
66
+ if duration > 360 and limitation:
67
  return "Please upload an audio file that is less than 1 minute.", None
68
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
69
  if len(audio.shape) > 1: