1
0

added '''suggested''' voice chunk size (it just updates it to how many files you have, not based on combined voice length, like it should

This commit is contained in:
mrq 2023-02-22 03:31:46 +00:00
parent cc47ed7242
commit 2aa70532e8

View File

@ -283,6 +283,25 @@ def setup_gradio():
refresh_voices = gr.Button(value="Refresh Voice List")
voice_latents_chunks = gr.Slider(label="Voice Chunks", minimum=1, maximum=64, value=1, step=1)
recompute_voice_latents = gr.Button(value="(Re)Compute Voice Latents")
def update_baseline_for_latents_chunks( voice ):
path = f'{get_voice_dir()}/{voice}/'
if not os.path.isdir(path):
return 1
files = os.listdir(path)
count = 0
for file in files:
if file[-4:] == ".wav":
count += 1
return count if count > 0 else 1
voice.change(
fn=update_baseline_for_latents_chunks,
inputs=voice,
outputs=voice_latents_chunks
)
with gr.Column():
candidates = gr.Slider(value=1, minimum=1, maximum=6, step=1, label="Candidates")
seed = gr.Number(value=0, precision=0, label="Seed")