eHemink commited on
Commit
4d2ee5e
1 Parent(s): 3ba7fb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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