Xubo-Liu commited on
Commit
230a04e
1 Parent(s): 1a350b2

Update ui_client.py

Browse files
Files changed (1) hide show
  1. ui_client.py +37 -24
ui_client.py CHANGED
@@ -387,7 +387,7 @@ with gr.Blocks(css=css) as interface:
387
 
388
  gr.HTML(
389
  """
390
- <p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU (VRAM>16G) in settings.
391
  <br>
392
  <a href="https://huggingface.co/spaces/Audio-AGI/WavJourney?duplicate=true">
393
  <img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
@@ -395,20 +395,23 @@ with gr.Blocks(css=css) as interface:
395
  """
396
  )
397
 
398
- gr.HTML(
399
- """
400
- <p>Begin with a text prompt, and let WavJourney transform it into captivating audio content. Experience engaging audio storylines, personalized voices, lifelike speech, emotionally resonant musical compositions, and immersive sound effects!
401
- <p/>
402
- """
403
- )
 
 
 
 
404
 
405
  gr.HTML(
406
  """
407
- <p>WavJourney Pipeline:<p/>
408
  <ul>
409
  <li>Stage 0: (optional) add your customized voice preset for a more personalized audio creation experience.</li>
410
  <li>Stage 1: generate the audio script based on the input text instruction (the default language is English, but you can actually type in your own language).</li>
411
- <li>Stage 2: select the suitable voice in the multilingual voice preset for each character in the audio script & generate audio.</li>
412
  </ul>
413
 
414
 
@@ -463,16 +466,27 @@ with gr.Blocks(css=css) as interface:
463
  community_icon = gr.HTML(community_icon_html)
464
  loading_icon = gr.HTML(loading_icon_html)
465
  share_button = gr.Button(value="Share to community", elem_id="share-btn")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
 
467
  gr.HTML(
468
  """
469
- <p>Share your generations with the community by clicking the share icon at the bottom right the generated audio!<p/>
470
- <p>
471
- Useful tips for prompting WavJourney:
472
- <p/>
473
  <ul>
474
- <li>You can use vague or specific descriptions, or a combination of them. For example: "male speech about pizze" or "a man is saying: I love pizza!"</li>
475
- <li> You can control the length of audio script by simply adding the restriction. For example: "generate an audio script around 10-15 lines (max length has been set to 30)"</li>
476
  <li> You can specify the language of the speaker. For example: "a boy is playing with a girl, boy's speech is in Chinese while girl's speech in Japanese"</li>
477
  <li> Explore more prompting techniques by yourself! 🤗</li>
478
  </ul>
@@ -499,26 +513,25 @@ with gr.Blocks(css=css) as interface:
499
  )
500
 
501
  # System Voice Presets
502
- gr.Markdown(label='System Voice Presets', value='# System Voice Presets')
503
- with gr.Accordion("Click to check system speakers", open=False):
504
- gr.Markdown('Supported Language: English, Chinese, French, German, Hindi, Italian, Japanese, Korean')
505
 
506
  system_markdown_voice_presets = gr.Dataframe(label='System Voice Presets', headers=VOICE_PRESETS_HEADERS,
507
  value=system_voice_presets)
508
  # User Voice Preset Related
509
- gr.Markdown('# (Optional) Speaker Customization ')
510
  with gr.Accordion("Click to add speakers", open=False):
511
- gr.Markdown(label='User Voice Presets', value='## User Voice Presets')
512
  get_voice_preset_to_list(ui_state)
513
  voice_presets_df = gr.Dataframe(headers=VOICE_PRESETS_HEADERS, col_count=len(VOICE_PRESETS_HEADERS),
514
  value=get_voice_preset_to_list(ui_state), interactive=False, visible=False)
515
  # voice_presets_ds = gr.Dataset(components=[gr.Dataframe(visible=True)], samples=get_voice_preset_to_list(ui_state))
516
  del_voice_btn = gr.Button(value='Delete Selected Voice Preset', visible=False)
517
- gr.Markdown(label='Add Voice Preset', value='## Add Voice Preset')
518
  gr.Markdown(
519
  """
520
-
521
- What makes for a good voice prompt? See detailed instructions <a href="https://github.com/gitmylo/bark-voice-cloning-HuBERT-quantizer">here</a>.
522
  """
523
  )
524
  vp_text_id = gr.Textbox(label='Id', lines=1, placeholder="Input voice preset id here.")
@@ -533,7 +546,7 @@ with gr.Blocks(css=css) as interface:
533
  # disclaimer
534
  gr.Markdown(
535
  """
536
- # Disclaimer
537
  We are not responsible for audio generated using semantics created by WavJourney. Just don't use it for illegal purposes.
538
  """
539
  )
 
387
 
388
  gr.HTML(
389
  """
390
+ <p>For faster inference without waiting in the queue, you may duplicate the space and upgrade to GPU (VRAM>16G) in settings.
391
  <br>
392
  <a href="https://huggingface.co/spaces/Audio-AGI/WavJourney?duplicate=true">
393
  <img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
 
395
  """
396
  )
397
 
398
+ # gr.HTML(
399
+ # """
400
+ # <p>Begin with a text prompt, and let WavJourney transform it into captivating audio content. Experience engaging audio storylines, personalized voices, lifelike speech, emotionally resonant musical compositions, and immersive sound effects!
401
+ # <p/>
402
+ # """
403
+ # )
404
+
405
+ gr.Markdown(value='## WavJourney Pipeline:')
406
+
407
+ gr.Markdown(value='Begin with a text prompt, and let WavJourney transform it into captivating audio content. Experience engaging audio storylines, personalized voices, lifelike speech, emotionally resonant musical compositions, and immersive sound effects!')
408
 
409
  gr.HTML(
410
  """
 
411
  <ul>
412
  <li>Stage 0: (optional) add your customized voice preset for a more personalized audio creation experience.</li>
413
  <li>Stage 1: generate the audio script based on the input text instruction (the default language is English, but you can actually type in your own language).</li>
414
+ <li>Stage 2: Select the suitable voice in the multilingual voice preset for each character in the audio script & generate audio.</li>
415
  </ul>
416
 
417
 
 
466
  community_icon = gr.HTML(community_icon_html)
467
  loading_icon = gr.HTML(loading_icon_html)
468
  share_button = gr.Button(value="Share to community", elem_id="share-btn")
469
+
470
+ gr.Markdown(value='### Share your creation with the community!')
471
+ gr.HTML(
472
+ """
473
+ <ul>
474
+ <li> You can share with the HuggingFace community by clicking the "Share to community" button.</li>
475
+ <li> You can also share your generations to our <a href="https://discord.com/invite/5Hqu9NmA8V">discord</a> channel!</li>
476
+ </ul>
477
+ """
478
+ )
479
+
480
+
481
+
482
+
483
+ gr.Markdown(value='### Useful tips for prompting WavJourney:')
484
 
485
  gr.HTML(
486
  """
 
 
 
 
487
  <ul>
488
+ <li>You can use vague or specific descriptions or a combination of them. For example: "male speech about pizza" or "a man is saying: I love pizza!"</li>
489
+ <li> You can control the length of the audio script by simply adding the restriction. For example: "generate an audio script around 10-15 lines (max length has been set to 30)"</li>
490
  <li> You can specify the language of the speaker. For example: "a boy is playing with a girl, boy's speech is in Chinese while girl's speech in Japanese"</li>
491
  <li> Explore more prompting techniques by yourself! 🤗</li>
492
  </ul>
 
513
  )
514
 
515
  # System Voice Presets
516
+ gr.Markdown(label='System Voice Presets', value='### System Voice Presets')
517
+ with gr.Accordion("Click to display system speakers", open=False):
518
+ gr.Markdown('Supported Language: English, Chinese, French, German, Hindi, Italian, Japanese, Korean, Russian, Spanish, Turkish, Polish, Portuguese')
519
 
520
  system_markdown_voice_presets = gr.Dataframe(label='System Voice Presets', headers=VOICE_PRESETS_HEADERS,
521
  value=system_voice_presets)
522
  # User Voice Preset Related
523
+ gr.Markdown('## (Optional) Speaker Customization ')
524
  with gr.Accordion("Click to add speakers", open=False):
525
+ gr.Markdown(label='User Voice Presets', value='### User Voice Presets')
526
  get_voice_preset_to_list(ui_state)
527
  voice_presets_df = gr.Dataframe(headers=VOICE_PRESETS_HEADERS, col_count=len(VOICE_PRESETS_HEADERS),
528
  value=get_voice_preset_to_list(ui_state), interactive=False, visible=False)
529
  # voice_presets_ds = gr.Dataset(components=[gr.Dataframe(visible=True)], samples=get_voice_preset_to_list(ui_state))
530
  del_voice_btn = gr.Button(value='Delete Selected Voice Preset', visible=False)
531
+ gr.Markdown(label='Add Voice Preset', value='### Add Voice Preset')
532
  gr.Markdown(
533
  """
534
+ What makes for good voice prompt? See detailed instructions <a href="https://github.com/gitmylo/bark-voice-cloning-HuBERT-quantizer">here</a>.
 
535
  """
536
  )
537
  vp_text_id = gr.Textbox(label='Id', lines=1, placeholder="Input voice preset id here.")
 
546
  # disclaimer
547
  gr.Markdown(
548
  """
549
+ ## Disclaimer
550
  We are not responsible for audio generated using semantics created by WavJourney. Just don't use it for illegal purposes.
551
  """
552
  )