Spaces:
Running
Running
Update infer.py
Browse files
infer.py
CHANGED
@@ -838,105 +838,5 @@ with gr.Blocks() as app:
|
|
838 |
]
|
839 |
)
|
840 |
sid.change(fn=get_vc, inputs=[sid, protect0], outputs=[spk_item, protect0, file_index, selected_model])
|
841 |
-
|
842 |
-
with gr.Row():
|
843 |
-
with gr.Column():
|
844 |
-
vc_input_bat = gr.Textbox(label="Input audio path (folder)", visible=True)
|
845 |
-
vc_output_bat = gr.Textbox(label="Output audio path (folder)", value="result/batch", visible=True)
|
846 |
-
with gr.Column():
|
847 |
-
vc_transform0_bat = gr.Number(
|
848 |
-
label="Transpose",
|
849 |
-
info='Type "12" to change from male to female convertion or Type "-12" to change female to male convertion.',
|
850 |
-
value=0
|
851 |
-
)
|
852 |
-
f0method0_bat = gr.Radio(
|
853 |
-
label="Pitch extraction algorithm",
|
854 |
-
info=f0method_info,
|
855 |
-
choices=f0method_mode,
|
856 |
-
value="pm",
|
857 |
-
interactive=True,
|
858 |
-
)
|
859 |
-
index_rate0_bat = gr.Slider(
|
860 |
-
minimum=0,
|
861 |
-
maximum=1,
|
862 |
-
label="Retrieval feature ratio",
|
863 |
-
value=0.7,
|
864 |
-
interactive=True,
|
865 |
-
)
|
866 |
-
filter_radius0_bat = gr.Slider(
|
867 |
-
minimum=0,
|
868 |
-
maximum=7,
|
869 |
-
label="Apply Median Filtering",
|
870 |
-
info="The value represents the filter radius and can reduce breathiness.",
|
871 |
-
value=3,
|
872 |
-
step=1,
|
873 |
-
interactive=True,
|
874 |
-
)
|
875 |
-
resample_sr0_bat = gr.Slider(
|
876 |
-
minimum=0,
|
877 |
-
maximum=48000,
|
878 |
-
label="Resample the output audio",
|
879 |
-
info="Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling",
|
880 |
-
value=0,
|
881 |
-
step=1,
|
882 |
-
interactive=True,
|
883 |
-
)
|
884 |
-
rms_mix_rate0_bat = gr.Slider(
|
885 |
-
minimum=0,
|
886 |
-
maximum=1,
|
887 |
-
label="Volume Envelope",
|
888 |
-
info="Use the volume envelope of the input to replace or mix with the volume envelope of the output. The closer the ratio is to 1, the more the output envelope is used",
|
889 |
-
value=1,
|
890 |
-
interactive=True,
|
891 |
-
)
|
892 |
-
protect0_bat = gr.Slider(
|
893 |
-
minimum=0,
|
894 |
-
maximum=0.5,
|
895 |
-
label="Voice Protection",
|
896 |
-
info="Protect voiceless consonants and breath sounds to prevent artifacts such as tearing in electronic music. Set to 0.5 to disable. Decrease the value to increase protection, but it may reduce indexing accuracy",
|
897 |
-
value=0.5,
|
898 |
-
step=0.01,
|
899 |
-
interactive=True,
|
900 |
-
)
|
901 |
-
with gr.Column():
|
902 |
-
vc_log_bat = gr.Textbox(label="Output Information", interactive=False)
|
903 |
-
vc_convert_bat = gr.Button("Convert", variant="primary")
|
904 |
-
vc_convert_bat.click(
|
905 |
-
vc_multi,
|
906 |
-
[
|
907 |
-
spk_item,
|
908 |
-
vc_input_bat,
|
909 |
-
vc_output_bat,
|
910 |
-
vc_transform0_bat,
|
911 |
-
f0method0_bat,
|
912 |
-
file_index,
|
913 |
-
index_rate0_bat,
|
914 |
-
filter_radius0_bat,
|
915 |
-
resample_sr0_bat,
|
916 |
-
rms_mix_rate0_bat,
|
917 |
-
protect0_bat,
|
918 |
-
],
|
919 |
-
[vc_log_bat],
|
920 |
-
)
|
921 |
-
with gr.TabItem("Model Downloader"):
|
922 |
-
gr.Markdown(
|
923 |
-
"# <center> Model Downloader (Beta)\n"+
|
924 |
-
"#### <center> To download multi link you have to put your link to the textbox and every link separated by space\n"+
|
925 |
-
"#### <center> Support Direct Link, Mega, Google Drive, etc"
|
926 |
-
)
|
927 |
-
with gr.Column():
|
928 |
-
md_text = gr.Textbox(label="URL")
|
929 |
-
with gr.Row():
|
930 |
-
md_download = gr.Button(label="Convert", variant="primary")
|
931 |
-
md_download_logs = gr.Textbox(label="Output information", interactive=False)
|
932 |
-
md_download.click(
|
933 |
-
fn=download_and_extract_models,
|
934 |
-
inputs=[md_text],
|
935 |
-
outputs=[md_download_logs]
|
936 |
-
)
|
937 |
-
with gr.TabItem("Settings"):
|
938 |
-
gr.Markdown(
|
939 |
-
"# <center> Settings\n"+
|
940 |
-
"#### <center> Work in progress"
|
941 |
-
)
|
942 |
app.queue(concurrency_count=1, max_size=50, api_open=config.api).launch(share=config.colab)
|
|
|
838 |
]
|
839 |
)
|
840 |
sid.change(fn=get_vc, inputs=[sid, protect0], outputs=[spk_item, protect0, file_index, selected_model])
|
841 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
app.queue(concurrency_count=1, max_size=50, api_open=config.api).launch(share=config.colab)
|