Omnibus commited on
Commit
107d5cd
1 Parent(s): 88cd06b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
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", n=1):
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
- in_text = gr.Textbox()
39
- out_audio = gr.Audio()
40
- go_btn = gr.Button()
 
41
 
42
- go_btn.click(run_bark,in_text,out_audio)
 
 
 
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()