Omnibus commited on
Commit
249facd
1 Parent(s): 67ec9cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,14 +10,15 @@ model = AutoModel.from_pretrained("suno/bark-small")
10
 
11
  def run_bark(text, lang="en", n=1):
12
  #history_prompt = []
13
- semantic_prompt=(f"v2/{lang}_speaker_{n}")
14
 
15
  #text=["Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe."],
16
  inputs = processor(text=text,
 
17
  return_tensors="pt",
18
  )
19
 
20
- speech_values = model.generate(**inputs, history_prompt=[semantic_prompt][0], do_sample=True)
21
 
22
  #sampling_rate = model.config.sample_rate
23
  sampling_rate = 24000
 
10
 
11
  def run_bark(text, lang="en", n=1):
12
  #history_prompt = []
13
+ semantic_prompt=f"v2/{lang}_speaker_{n}"
14
 
15
  #text=["Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe."],
16
  inputs = processor(text=text,
17
+ voice_preset = semantic_prompt
18
  return_tensors="pt",
19
  )
20
 
21
+ speech_values = model.generate(**inputs, do_sample=True)
22
 
23
  #sampling_rate = model.config.sample_rate
24
  sampling_rate = 24000