Spaces:
Running
Running
Update app.py
Browse files
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 |
|