hexgrad commited on
Commit
efabf35
·
verified ·
1 Parent(s): 4215232

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -509,15 +509,16 @@ with gr.Blocks() as basic_tts:
509
  trim = gr.Slider(minimum=0, maximum=1, value=0.5, step=0.1, label='✂️ Trim', info='How much to cut from both ends')
510
  with gr.Accordion('Output Tokens', open=True):
511
  out_ps = gr.Textbox(interactive=False, show_label=False, info='Tokens used to generate the audio, up to 510 allowed. Same as input tokens if supplied, excluding unknowns.')
512
- with gr.Accordion('Voice Mixer', open=False):
513
- gr.Markdown('Create a custom voice by mixing and matching other voices. Click an orange button to add one part to your mix, or click a gray button to start over. You can also enter a voice mix as text.')
514
- for i in range(8):
515
- with gr.Row():
516
- for j in range(4):
517
- with gr.Column():
518
- btn = gr.Button(list(CHOICES.values())[i*4+j], variant='primary' if i*4+j < 10 else 'secondary')
519
- btn.click(lambda v, b: f'{v}+{b}' if v.startswith(b[:2]) else b, inputs=[voice, btn], outputs=[voice])
520
- voice.change(lambda v, b: gr.Button(b, variant='primary' if v.startswith(b[:2]) else 'secondary'), inputs=[voice, btn], outputs=[btn])
 
521
  with gr.Row():
522
  sk = gr.Textbox(visible=False)
523
  text.change(lambda: os.environ['SK'], outputs=[sk])
 
509
  trim = gr.Slider(minimum=0, maximum=1, value=0.5, step=0.1, label='✂️ Trim', info='How much to cut from both ends')
510
  with gr.Accordion('Output Tokens', open=True):
511
  out_ps = gr.Textbox(interactive=False, show_label=False, info='Tokens used to generate the audio, up to 510 allowed. Same as input tokens if supplied, excluding unknowns.')
512
+ with gr.Row():
513
+ with gr.Accordion('Voice Mixer', open=False):
514
+ gr.Markdown('Create a custom voice by mixing and matching other voices. Click an orange button to add one part to your mix, or click a gray button to start over. You can also enter a voice mix as text.')
515
+ for i in range(8):
516
+ with gr.Row():
517
+ for j in range(4):
518
+ with gr.Column():
519
+ btn = gr.Button(list(CHOICES.values())[i*4+j], variant='primary' if i*4+j < 10 else 'secondary')
520
+ btn.click(lambda v, b: f'{v}+{b}' if v.startswith(b[:2]) else b, inputs=[voice, btn], outputs=[voice])
521
+ voice.change(lambda v, b: gr.Button(b, variant='primary' if v.startswith(b[:2]) else 'secondary'), inputs=[voice, btn], outputs=[btn])
522
  with gr.Row():
523
  sk = gr.Textbox(visible=False)
524
  text.change(lambda: os.environ['SK'], outputs=[sk])