Spaces:
Running
Running
Commit
•
daaa3ac
1
Parent(s):
b1eebc3
Added Vshojo and Phaseconnect models. Updated Vedal and Anny images. Added credits
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ limitation = os.getenv("SYSTEM") == "spaces"
|
|
31 |
|
32 |
audio_mode = []
|
33 |
f0method_mode = ["pm", "crepe", "harvest"]
|
34 |
-
f0method_info = "PM is fast
|
35 |
if limitation is True:
|
36 |
audio_mode = ["TTS Audio", "Upload audio"]
|
37 |
else:
|
@@ -47,11 +47,11 @@ def infer(name, path, index, vc_audio_mode, vc_input, vc_upload, tts_text, tts_v
|
|
47 |
audio, sr = librosa.load(vc_input, sr=16000, mono=True)
|
48 |
elif vc_audio_mode == "Upload audio":
|
49 |
if vc_upload is None:
|
50 |
-
return "
|
51 |
sampling_rate, audio = vc_upload
|
52 |
duration = audio.shape[0] / sampling_rate
|
53 |
if duration > 360 and limitation:
|
54 |
-
return "Please upload an audio file that is less than 1 minute.", None
|
55 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
56 |
if len(audio.shape) > 1:
|
57 |
audio = librosa.to_mono(audio.transpose(1, 0))
|
@@ -342,7 +342,8 @@ if __name__ == '__main__':
|
|
342 |
"# <center> VTuber RVC Models\n"
|
343 |
"### <center> Space by Kit Lemonfoot / Noel Shirogane's High Flying Birds"
|
344 |
"<center> Original space by megaaziib & zomehwh\n"
|
345 |
-
"### <center> Please credit the original model authors if you use this Space
|
|
|
346 |
"<center> (I will be adding more tabs later. Don't ask.)\n"
|
347 |
)
|
348 |
for (folder_title, folder, models) in categories:
|
@@ -393,7 +394,7 @@ if __name__ == '__main__':
|
|
393 |
minimum=0,
|
394 |
maximum=1,
|
395 |
label="Retrieval feature ratio",
|
396 |
-
info="
|
397 |
value=0.4,
|
398 |
interactive=True,
|
399 |
)
|
@@ -410,7 +411,7 @@ if __name__ == '__main__':
|
|
410 |
minimum=0,
|
411 |
maximum=48000,
|
412 |
label="Resample the output audio",
|
413 |
-
info="Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling",
|
414 |
value=0,
|
415 |
step=1,
|
416 |
interactive=True,
|
@@ -504,6 +505,13 @@ if __name__ == '__main__':
|
|
504 |
tts_voice
|
505 |
]
|
506 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
if limitation is True:
|
508 |
app.queue(concurrency_count=1, max_size=20, api_open=config.api).launch(share=config.colab)
|
509 |
else:
|
|
|
31 |
|
32 |
audio_mode = []
|
33 |
f0method_mode = ["pm", "crepe", "harvest"]
|
34 |
+
f0method_info = "PM is fast but low quality, crepe and harvest are slow but good quality, RMVPE is the best of both worlds. (Default: RMVPE))"
|
35 |
if limitation is True:
|
36 |
audio_mode = ["TTS Audio", "Upload audio"]
|
37 |
else:
|
|
|
47 |
audio, sr = librosa.load(vc_input, sr=16000, mono=True)
|
48 |
elif vc_audio_mode == "Upload audio":
|
49 |
if vc_upload is None:
|
50 |
+
return "Please upload an audio file.", None
|
51 |
sampling_rate, audio = vc_upload
|
52 |
duration = audio.shape[0] / sampling_rate
|
53 |
if duration > 360 and limitation:
|
54 |
+
return "Too long! Please upload an audio file that is less than 1 minute.", None
|
55 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
56 |
if len(audio.shape) > 1:
|
57 |
audio = librosa.to_mono(audio.transpose(1, 0))
|
|
|
342 |
"# <center> VTuber RVC Models\n"
|
343 |
"### <center> Space by Kit Lemonfoot / Noel Shirogane's High Flying Birds"
|
344 |
"<center> Original space by megaaziib & zomehwh\n"
|
345 |
+
"### <center> Please credit the original model authors if you use this Space."
|
346 |
+
"<center>Do no evil.\n"
|
347 |
"<center> (I will be adding more tabs later. Don't ask.)\n"
|
348 |
)
|
349 |
for (folder_title, folder, models) in categories:
|
|
|
394 |
minimum=0,
|
395 |
maximum=1,
|
396 |
label="Retrieval feature ratio",
|
397 |
+
info="Accent control. Too high will usually sound too robotic. (Default: 0.4)",
|
398 |
value=0.4,
|
399 |
interactive=True,
|
400 |
)
|
|
|
411 |
minimum=0,
|
412 |
maximum=48000,
|
413 |
label="Resample the output audio",
|
414 |
+
info="Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling.",
|
415 |
value=0,
|
416 |
step=1,
|
417 |
interactive=True,
|
|
|
505 |
tts_voice
|
506 |
]
|
507 |
)
|
508 |
+
gr.Markdown(
|
509 |
+
"## <center>Credit to:\n"
|
510 |
+
"#### <center>Original devs:\n"
|
511 |
+
"<center>the RVC Project, lj1995, zomehwh \n\n"
|
512 |
+
"#### <center>Model creators:\n"
|
513 |
+
"<center>dacoolkid44, Hijack, Maki Ligon, megaaziib, KitLemonfoot, yeey5, Sui, Itaxhix, Acato, Kyuubical, MartinFLL, Listra92, IshimaIshimsky, ZomballTH, Jotape91, RigidSpinner, RandomAssBettel, Oida, Nhat Minh, Ardha27, Legitdark, TempoHawk, 0x3e9, Kaiaya, Skeetawn, Sonphantrung, Pianissimo\n"
|
514 |
+
)
|
515 |
if limitation is True:
|
516 |
app.queue(concurrency_count=1, max_size=20, api_open=config.api).launch(share=config.colab)
|
517 |
else:
|