nateraw commited on
Commit
95688f8
1 Parent(s): a1c14f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -9
app.py CHANGED
@@ -66,7 +66,19 @@ def predict(
66
  return model.target_sample, audio
67
 
68
 
69
- interface = gr.Interface(
 
 
 
 
 
 
 
 
 
 
 
 
70
  predict,
71
  inputs=[
72
  gr.Dropdown(speakers, value=speakers[0], label="Target Speaker"),
@@ -79,15 +91,30 @@ interface = gr.Interface(
79
  ],
80
  outputs="audio",
81
  title="Voice Cloning",
82
- description=f"""
83
- This app uses models trained with so-vits-svc-fork to clone your voice. Model currently being used is https://hf.co/{repo_id}. To change the model being served, duplicate the space and update the repo_id in `app.py`.
84
- """.strip(),
85
- article="""
86
- <p style='text-align: center'>
87
- <a href='https://github.com/voicepaw/so-vits-svc-fork' target='_blank'>Github Repo</a>
88
- </p>
89
- """
90
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
  if __name__ == '__main__':
93
  interface.launch()
 
66
  return model.target_sample, audio
67
 
68
 
69
+ description=f"""
70
+ This app uses models trained with so-vits-svc-fork to clone your voice. Model currently being used is https://hf.co/{repo_id}.
71
+
72
+ To change the model being served, duplicate the space and update the `repo_id` in `app.py`.
73
+ """.strip()
74
+
75
+ article="""
76
+ <p style='text-align: center'>
77
+ <a href='https://github.com/voicepaw/so-vits-svc-fork' target='_blank'>Github Repo</a>
78
+ </p>
79
+ """.strip()
80
+
81
+ interface_mic = gr.Interface(
82
  predict,
83
  inputs=[
84
  gr.Dropdown(speakers, value=speakers[0], label="Target Speaker"),
 
91
  ],
92
  outputs="audio",
93
  title="Voice Cloning",
94
+ description=description,
95
+ article=article,
 
 
 
 
 
 
96
  )
97
+ interface_file = gr.Interface(
98
+ predict,
99
+ inputs=[
100
+ gr.Dropdown(speakers, value=speakers[0], label="Target Speaker"),
101
+ gr.Audio(type="filepath", source="upload", label="Source Audio"),
102
+ gr.Slider(-12, 12, value=0, step=1, label="Transpose (Semitones)"),
103
+ gr.Checkbox(False, label="Auto Predict F0"),
104
+ gr.Slider(0.0, 1.0, value=0.0, step=0.1, label='cluster infer ratio'),
105
+ gr.Slider(0.0, 1.0, value=0.4, step=0.1, label="noise scale"),
106
+ gr.Dropdown(choices=["crepe", "crepe-tiny", "parselmouth", "dio", "harvest"], value='crepe', label="f0 method"),
107
+ ],
108
+ outputs="audio",
109
+ title="Voice Cloning",
110
+ description=description,
111
+ article=article,
112
+ )
113
+ interface = gr.TabbedInterface(
114
+ [interface_mic, interface_file],
115
+ ["Clone From Mic", "Clone From File"],
116
+ )
117
+
118
 
119
  if __name__ == '__main__':
120
  interface.launch()