Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ model = BarkModel.from_pretrained("suno/bark-small").to(device)
|
|
16 |
|
17 |
|
18 |
|
19 |
-
def run_bark(text, lang="en"
|
20 |
#history_prompt = []
|
21 |
semantic_prompt=f"v2/{lang}_speaker_{n}"
|
22 |
|
@@ -35,10 +35,14 @@ def run_bark(text, lang="en", n=1):
|
|
35 |
return ("bark_out.wav")
|
36 |
|
37 |
with gr.Blocks() as app:
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
41 |
|
42 |
-
|
|
|
|
|
|
|
43 |
|
44 |
app.launch()
|
|
|
16 |
|
17 |
|
18 |
|
19 |
+
def run_bark(text, n, lang="en"):
|
20 |
#history_prompt = []
|
21 |
semantic_prompt=f"v2/{lang}_speaker_{n}"
|
22 |
|
|
|
35 |
return ("bark_out.wav")
|
36 |
|
37 |
with gr.Blocks() as app:
|
38 |
+
with gr.Column():
|
39 |
+
in_text = gr.Textbox()
|
40 |
+
speaker_num = gr.Number(value=0)
|
41 |
+
go_btn = gr.Button()
|
42 |
|
43 |
+
with gr.Column():
|
44 |
+
out_audio = gr.Audio()
|
45 |
+
|
46 |
+
go_btn.click(run_bark,[in_text, speark_num],out_audio)
|
47 |
|
48 |
app.launch()
|