Spaces:
Running
Running
Vaibhav Srivastav
commited on
Commit
·
3795637
1
Parent(s):
e7e0ccd
up
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ description = """
|
|
38 |
<a style="display:inline-block" href='https://github.com/charactr-platform/vocos'><img src='https://img.shields.io/github/stars/charactr-platform/vocos?style=social' /></a>
|
39 |
<a style="display:inline-block; margin-left: 1em" href="https://huggingface.co/spaces/hf-audio/vocos-bark?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space%20to%20skip%20the%20queue-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a>
|
40 |
</div>
|
41 |
-
Bark is a universal text-to-audio model created by
|
42 |
Bark can generate highly realistic, multilingual speech as well as other audio - including music, background noise and simple sound effects. \
|
43 |
In this demo, we leverage charactr.ai's Vocos model to create high quality audio from bark. \
|
44 |
"""
|
@@ -79,18 +79,20 @@ def generate_audio(text, voice_preset = None, lag = 0):
|
|
79 |
with gr.Blocks() as demo_blocks:
|
80 |
gr.Markdown(title)
|
81 |
gr.Markdown(description)
|
82 |
-
with gr.
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
95 |
|
96 |
demo_blocks.queue().launch(debug=True)
|
|
|
38 |
<a style="display:inline-block" href='https://github.com/charactr-platform/vocos'><img src='https://img.shields.io/github/stars/charactr-platform/vocos?style=social' /></a>
|
39 |
<a style="display:inline-block; margin-left: 1em" href="https://huggingface.co/spaces/hf-audio/vocos-bark?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space%20to%20skip%20the%20queue-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a>
|
40 |
</div>
|
41 |
+
Bark is a universal text-to-audio model created by Suno. \
|
42 |
Bark can generate highly realistic, multilingual speech as well as other audio - including music, background noise and simple sound effects. \
|
43 |
In this demo, we leverage charactr.ai's Vocos model to create high quality audio from bark. \
|
44 |
"""
|
|
|
79 |
with gr.Blocks() as demo_blocks:
|
80 |
gr.Markdown(title)
|
81 |
gr.Markdown(description)
|
82 |
+
with gr.Row():
|
83 |
+
with gr.Column():
|
84 |
+
inp_text = gr.Textbox(label="Input Text", info="What would you like bark to synthesise?")
|
85 |
+
spk = gr.Dropdown(
|
86 |
+
speaker_embeddings,
|
87 |
+
value=None,
|
88 |
+
label="Acoustic Prompt",
|
89 |
+
info="Default: Unconditional Generation"
|
90 |
+
)
|
91 |
+
btn = gr.Button("Generate Audio!")
|
92 |
|
93 |
+
with gr.Column():
|
94 |
+
out_audio_vocos = gr.Audio(type="numpy", autoplay=False, label="Generated Audio", show_label=True)
|
95 |
+
|
96 |
+
btn.click(generate_audio, [inp_text, spk], [out_audio_vocos])
|
97 |
|
98 |
demo_blocks.queue().launch(debug=True)
|