Omnibus commited on
Commit
f3aa612
β€’
1 Parent(s): 249facd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -14,14 +14,15 @@ def run_bark(text, lang="en", n=1):
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
25
  scipy.io.wavfile.write("bark_out.wav", rate=sampling_rate, data=speech_values.cpu().numpy().squeeze())
26
  return ("bark_out.wav")
27
 
 
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
+ sampling_rate = model.generation_config.sample_rate
23
 
24
  #sampling_rate = model.config.sample_rate
25
+ #sampling_rate = 24000
26
  scipy.io.wavfile.write("bark_out.wav", rate=sampling_rate, data=speech_values.cpu().numpy().squeeze())
27
  return ("bark_out.wav")
28