Update app.py
Browse files
app.py
CHANGED
@@ -337,33 +337,30 @@ def voice_conversion(source, target, diffusion_steps, length_adjust, inference_c
|
|
337 |
|
338 |
|
339 |
if __name__ == "__main__":
|
340 |
-
description = ("
|
341 |
-
"
|
342 |
-
"
|
343 |
-
"无需训练的 zero-shot 语音/歌声转换模型,若需本地部署查看[GitHub页面](https://github.com/Plachtaa/seed-vc)<br>"
|
344 |
-
"请注意,参考音频若超过 25 秒,则会被自动裁剪至此长度。<br>若源音频和参考音频的总时长超过 30 秒,源音频将被分段处理。")
|
345 |
inputs = [
|
346 |
-
gr.Audio(type="filepath", label="
|
347 |
-
gr.Audio(type="filepath", label="
|
348 |
-
gr.Slider(minimum=1, maximum=200, value=
|
349 |
-
gr.Slider(minimum=0.5, maximum=2.0, step=0.1, value=1.0, label="
|
350 |
-
gr.Slider(minimum=0.0, maximum=1.0, step=0.1, value=0.7, label="
|
351 |
-
gr.Checkbox(label="
|
352 |
-
gr.Checkbox(label="
|
353 |
-
|
354 |
-
gr.Slider(label='Pitch shift / 音调变换', minimum=-24, maximum=24, step=1, value=0, info="Pitch shift in semitones, only works when F0 conditioned model is used / 半音数的音高变换,仅在勾选 '启用F0输入' 时生效"),
|
355 |
]
|
356 |
|
357 |
examples = [["examples/source/yae_0.wav", "examples/reference/dingzhen_0.wav", 25, 1.0, 0.7, False, True, 0],
|
358 |
-
["examples/source/jay_0.wav", "examples/reference/azuma_0.wav", 25, 1.0, 0.7,
|
359 |
["examples/source/Wiz Khalifa,Charlie Puth - See You Again [vocals]_[cut_28sec].wav",
|
360 |
-
"examples/reference/
|
361 |
["examples/source/TECHNOPOLIS - 2085 [vocals]_[cut_14sec].wav",
|
362 |
"examples/reference/trump_0.wav", 50, 1.0, 0.7, True, False, -12],
|
363 |
]
|
364 |
|
365 |
-
outputs = [gr.Audio(label="
|
366 |
-
gr.Audio(label="
|
367 |
|
368 |
gr.Interface(fn=voice_conversion,
|
369 |
description=description,
|
|
|
337 |
|
338 |
|
339 |
if __name__ == "__main__":
|
340 |
+
description = ("Zero-shot音声変換モデル(学習不要)。ローカルでの利用方法は[GitHubリポジトリ](https://github.com/Plachtaa/seed-vc)をご覧ください。"
|
341 |
+
"参考音声が25秒を超える場合、自動的に25秒にクリップされます。"
|
342 |
+
"また、元音声と参考音声の合計時間が30秒を超える場合、元音声は分割処理されます。")
|
|
|
|
|
343 |
inputs = [
|
344 |
+
gr.Audio(type="filepath", label="元音声"),
|
345 |
+
gr.Audio(type="filepath", label="参考音声"),
|
346 |
+
gr.Slider(minimum=1, maximum=200, value=10, step=1, label="拡散ステップ数", info="デフォルトは10、50~100が最適な品質"),
|
347 |
+
gr.Slider(minimum=0.5, maximum=2.0, step=0.1, value=1.0, label="長さ調整", info="1.0未満で速度を上げ、1.0以上で速度を遅くします"),
|
348 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.1, value=0.7, label="推論CFG率", info="わずかな影響があります"),
|
349 |
+
gr.Checkbox(label="F0条件付きモデルを使用", value=False, info="歌声変換には必須です"),
|
350 |
+
gr.Checkbox(label="F0自動調整", value=True, info="F0をおおよそ調整して目標音声に合わせます。F0条件付きモデル使用時にのみ有効です"),
|
351 |
+
gr.Slider(label='音程変換', minimum=-24, maximum=24, step=1, value=0, info="半音単位の音程変換。F0条件付きモデル使用時にのみ有効です"),
|
|
|
352 |
]
|
353 |
|
354 |
examples = [["examples/source/yae_0.wav", "examples/reference/dingzhen_0.wav", 25, 1.0, 0.7, False, True, 0],
|
355 |
+
["examples/source/jay_0.wav", "examples/reference/azuma_0.wav", 25, 1.0, 0.7, True, True, 0],
|
356 |
["examples/source/Wiz Khalifa,Charlie Puth - See You Again [vocals]_[cut_28sec].wav",
|
357 |
+
"examples/reference/teio_0.wav", 100, 1.0, 0.7, True, False, 0],
|
358 |
["examples/source/TECHNOPOLIS - 2085 [vocals]_[cut_14sec].wav",
|
359 |
"examples/reference/trump_0.wav", 50, 1.0, 0.7, True, False, -12],
|
360 |
]
|
361 |
|
362 |
+
outputs = [gr.Audio(label="ストリーム出力音声", streaming=True, format='mp3'),
|
363 |
+
gr.Audio(label="完全出力音声", streaming=False, format='wav')]
|
364 |
|
365 |
gr.Interface(fn=voice_conversion,
|
366 |
description=description,
|