Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ import transformers
|
|
16 |
from transformers import pipeline
|
17 |
from bark import SAMPLE_RATE, generate_audio, preload_models
|
18 |
from scipy.io.wavfile import write as write_wav
|
|
|
19 |
import gradio as gr
|
20 |
|
21 |
# Here is the code
|
@@ -71,6 +72,7 @@ def abstract_to_audio(insert_pdf):
|
|
71 |
# generate audio from text
|
72 |
text_prompt = tss_prompt
|
73 |
audio_array = generate_audio(text_prompt)
|
|
|
74 |
|
75 |
|
76 |
|
|
|
16 |
from transformers import pipeline
|
17 |
from bark import SAMPLE_RATE, generate_audio, preload_models
|
18 |
from scipy.io.wavfile import write as write_wav
|
19 |
+
from IPython.display import Audio
|
20 |
import gradio as gr
|
21 |
|
22 |
# Here is the code
|
|
|
72 |
# generate audio from text
|
73 |
text_prompt = tss_prompt
|
74 |
audio_array = generate_audio(text_prompt)
|
75 |
+
return Audio(audio_array, rate=SAMPLE_RATE)
|
76 |
|
77 |
|
78 |
|