Spaces:
Running
Running
Update src/covergen.py
Browse files- src/covergen.py +10 -8
src/covergen.py
CHANGED
@@ -28,7 +28,7 @@ if __name__ == '__main__':
|
|
28 |
voice_models = ignore_files(rvc_models_dir)
|
29 |
|
30 |
with gr.Blocks(
|
31 |
-
title="
|
32 |
css="footer{display:none !important}") as app:
|
33 |
|
34 |
if warning:
|
@@ -37,20 +37,19 @@ if __name__ == '__main__':
|
|
37 |
|
38 |
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
43 |
|
|
|
44 |
with gr.Tab("Voice Conversion"):
|
45 |
with gr.Row(equal_height=False):
|
46 |
with gr.Column(scale=2, variant='panel'):
|
47 |
local_file = gr.Audio(label='Audio File', interactive=True, show_download_button=False, show_share_button=False)
|
48 |
|
49 |
|
50 |
-
|
51 |
-
generate_btn = gr.Button("Generate", variant="primary", scale=2)
|
52 |
-
converted_voice = gr.Audio(label='Converted Voice', scale=9)
|
53 |
-
output_format = gr.Dropdown(['mp3', 'flac', 'wav'], value='mp3', label='File Format', allow_custom_value=False, filterable=False, scale=1)
|
54 |
|
55 |
with gr.Accordion('Voice Conversion Settings', open=False):
|
56 |
with gr.Group():
|
@@ -69,10 +68,13 @@ if __name__ == '__main__':
|
|
69 |
rms_mix_rate = gr.Slider(0, 1, value=0.25, step=0.01, label='RMS Mix Rate', info='Controls the extent to which the output signal is mixed with its envelope. A value close to 1 increases the use of the envelope of the output signal, which may improve sound quality.')
|
70 |
protect = gr.Slider(0, 0.5, value=0.33, step=0.01, label='Consonant Protection', info='Controls the extent to which individual consonants and breathing sounds are protected from electroacoustic breaks and other artifacts. A maximum value of 0.5 provides the most protection, but may increase the indexing effect, which may negatively impact sound quality. Reducing the value may decrease the extent of protection, but reduce the indexing effect.')
|
71 |
|
|
|
|
|
72 |
ref_btn.click(update_models_list, None, outputs=rvc_model)
|
73 |
generate_btn.click(song_cover_pipeline,
|
74 |
inputs=[local_file, rvc_model, pitch, index_rate, filter_radius, rms_mix_rate, f0_method, crepe_hop_length, protect, output_format],
|
75 |
outputs=[converted_voice])
|
|
|
76 |
|
77 |
with gr.Tab('Merge/Process'):
|
78 |
with gr.Row(equal_height=False):
|
|
|
28 |
voice_models = ignore_files(rvc_models_dir)
|
29 |
|
30 |
with gr.Blocks(
|
31 |
+
title="RVC Inference",
|
32 |
css="footer{display:none !important}") as app:
|
33 |
|
34 |
if warning:
|
|
|
37 |
|
38 |
|
39 |
|
40 |
+
with gr.Row():
|
41 |
+
rvc_model = gr.Dropdown(voice_models, label='Voice Models')
|
42 |
+
` ref_btn = gr.Button('Refresh Models List', variant='primary')
|
43 |
+
pitch = gr.Slider(-24, 24, value=0, step=0.5, label='Pitch Adjustment', info='-24 - male voice || 24 - female voice')
|
44 |
|
45 |
+
generate_btn = gr.Button("Generate", variant="primary", scale=2)
|
46 |
with gr.Tab("Voice Conversion"):
|
47 |
with gr.Row(equal_height=False):
|
48 |
with gr.Column(scale=2, variant='panel'):
|
49 |
local_file = gr.Audio(label='Audio File', interactive=True, show_download_button=False, show_share_button=False)
|
50 |
|
51 |
|
52 |
+
output_format = gr.Dropdown(['mp3', 'flac', 'wav'], value='mp3', label='File Format', allow_custom_value=False, filterable=False, scale=1)
|
|
|
|
|
|
|
53 |
|
54 |
with gr.Accordion('Voice Conversion Settings', open=False):
|
55 |
with gr.Group():
|
|
|
68 |
rms_mix_rate = gr.Slider(0, 1, value=0.25, step=0.01, label='RMS Mix Rate', info='Controls the extent to which the output signal is mixed with its envelope. A value close to 1 increases the use of the envelope of the output signal, which may improve sound quality.')
|
69 |
protect = gr.Slider(0, 0.5, value=0.33, step=0.01, label='Consonant Protection', info='Controls the extent to which individual consonants and breathing sounds are protected from electroacoustic breaks and other artifacts. A maximum value of 0.5 provides the most protection, but may increase the indexing effect, which may negatively impact sound quality. Reducing the value may decrease the extent of protection, but reduce the indexing effect.')
|
70 |
|
71 |
+
|
72 |
+
converted_voice = gr.Audio(label='Converted Voice', scale=9)
|
73 |
ref_btn.click(update_models_list, None, outputs=rvc_model)
|
74 |
generate_btn.click(song_cover_pipeline,
|
75 |
inputs=[local_file, rvc_model, pitch, index_rate, filter_radius, rms_mix_rate, f0_method, crepe_hop_length, protect, output_format],
|
76 |
outputs=[converted_voice])
|
77 |
+
|
78 |
|
79 |
with gr.Tab('Merge/Process'):
|
80 |
with gr.Row(equal_height=False):
|