Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -341,11 +341,10 @@ reference_files = [
|
|
341 |
("四国めたん", "sikokumetan")
|
342 |
]
|
343 |
|
344 |
-
def proxy_voice_conversion(source, selected_reference, diffusion_steps, length_adjust, inference_cfg_rate, f0_condition, auto_f0_adjust, pitch_shift):
|
345 |
-
reference_path = os.path.join(default_dir, f"{selected_reference}.mp3")
|
346 |
-
return voice_conversion(source, reference_path, diffusion_steps, length_adjust, inference_cfg_rate, f0_condition, auto_f0_adjust, pitch_shift)
|
347 |
|
348 |
-
gallery_items = [[os.path.join(default_dir, f"{filename}.webp"), name] for name, filename in reference_files]
|
|
|
|
|
349 |
|
350 |
description = ("Zero-shot音声変換モデル(学習不要)。ローカルでの利用方法は[GitHubリポジトリ](https://github.com/Plachtaa/seed-vc)をご覧ください。"
|
351 |
"参考音声が25秒を超える場合、自動的に25秒にクリップされます。"
|
@@ -353,6 +352,7 @@ description = ("Zero-shot音声変換モデル(学習不要)。ローカル
|
|
353 |
|
354 |
inputs = [
|
355 |
gr.Audio(type="filepath", label="元音声"),
|
|
|
356 |
gr.Gallery(label="参照音声を選択", value=gallery_items, columns=5, interactive=True),
|
357 |
gr.Slider(minimum=1, maximum=200, value=10, step=1, label="拡散ステップ数", info="デフォルトは10、50~100が最適な品質"),
|
358 |
gr.Slider(minimum=0.5, maximum=2.0, step=0.1, value=1.0, label="長さ調整", info="1.0未満で速度を上げ、1.0以上で速度を遅くします"),
|
@@ -368,10 +368,10 @@ outputs = [
|
|
368 |
]
|
369 |
|
370 |
gr.Interface(
|
371 |
-
fn=
|
372 |
description=description,
|
373 |
inputs=inputs,
|
374 |
outputs=outputs,
|
375 |
title="Seed Voice Conversion with Reference Gallery",
|
376 |
cache_examples=False,
|
377 |
-
).launch()
|
|
|
341 |
("四国めたん", "sikokumetan")
|
342 |
]
|
343 |
|
|
|
|
|
|
|
344 |
|
345 |
+
gallery_items = [[os.path.join(default_dir, f"{filename}.webp"), name, filename] for name, filename in reference_files]
|
346 |
+
|
347 |
+
default_reference = os.path.join(default_dir, f"{reference_files[0][1]}.mp3")
|
348 |
|
349 |
description = ("Zero-shot音声変換モデル(学習不要)。ローカルでの利用方法は[GitHubリポジトリ](https://github.com/Plachtaa/seed-vc)をご覧ください。"
|
350 |
"参考音声が25秒を超える場合、自動的に25秒にクリップされます。"
|
|
|
352 |
|
353 |
inputs = [
|
354 |
gr.Audio(type="filepath", label="元音声"),
|
355 |
+
gr.Audio(type="filepath", label="参考音声", visible=False, value=default_reference),
|
356 |
gr.Gallery(label="参照音声を選択", value=gallery_items, columns=5, interactive=True),
|
357 |
gr.Slider(minimum=1, maximum=200, value=10, step=1, label="拡散ステップ数", info="デフォルトは10、50~100が最適な品質"),
|
358 |
gr.Slider(minimum=0.5, maximum=2.0, step=0.1, value=1.0, label="長さ調整", info="1.0未満で速度を上げ、1.0以上で速度を遅くします"),
|
|
|
368 |
]
|
369 |
|
370 |
gr.Interface(
|
371 |
+
fn=voice_conversion,
|
372 |
description=description,
|
373 |
inputs=inputs,
|
374 |
outputs=outputs,
|
375 |
title="Seed Voice Conversion with Reference Gallery",
|
376 |
cache_examples=False,
|
377 |
+
).launch()
|