Spaces:
Running
Running
Update src/covergen.py
Browse files27 unmodified lines28293031313233342 unmodified lines373839404041424142434445464748495051505152535253545512 unmodified lines6869707172737475767778798027 unmodified lines voice_models = ignore_files(rvc_models_dir)
with gr.Blocks( title="CoverGen Lite - Politrees", title="RVC Inference", css="footer{display:none !important}") as app: if warning:2 unmodified lines
with gr.Row(): rvc_model = gr.Dropdown(voice_models, label='Voice Models') ref_btn = gr.Button('Refresh Models List', variant='primary') pitch = gr.Slider(-24, 24, value=0, step=0.5, label='Pitch Adjustment', info='-24 - male voice || 24 - female voice') rvc_model = gr.Dropdown(voice_models, label='Voice Models') ` ref_btn = gr.Button('Refresh Models List', variant='primary') pitch = gr.Slider(-24, 24, value=0, step=0.5, label='Pitch Adjustment', info='-24 - male voice || 24 - female voice')
generate_btn = gr.Button("Generate", variant="primary", scale=2) with gr.Tab("Voice Conversion"): with gr.Row(equal_height=False): with gr.Column(scale=2, variant='panel'): local_file = gr.Audio(label='Audio File', interactive=True, show_download_button=False, show_share_button=False) with gr.Group(): generate_btn = gr.Button("Generate", variant="primary", scale=2) converted_voice = gr.Audio(label='Converted Voice', scale=9) output_format = gr.Dropdown(['mp3', 'flac', 'wav'], value='mp3', label='File Format', allow_custom_value=False, filterable=False, scale=1) output_format = gr.Dropdown(['mp3', 'flac', 'wav'], value='mp3', label='File Format', allow_custom_value=False, filterable=False, scale=1)
with gr.Accordion('Voice Conversion Settings', open=False): with gr.Group():12 unmodified lines 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.') 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.')
converted_voice = gr.Audio(label='Converted Voice', scale=9) ref_btn.click(update_models_list, None, outputs=rvc_model) generate_btn.click(song_cover_pipeline, inputs=[local_file, rvc_model, pitch, index_rate, filter_radius, rms_mix_rate, f0_method, crepe_hop_length, protect, output_format], outputs=[converted_voice])
with gr.Tab('Merge/Process'): with gr.Row(equal_height=False):src/covergen.py+10-8