eHemink commited on
Commit
f8ca0d6
·
1 Parent(s): c7aa6ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -16,7 +16,7 @@ import re
16
  import transformers
17
  import scipy
18
  from transformers import pipeline
19
- #from bark import SAMPLE_RATE, generate_audio, preload_models
20
  #from scipy.io.wavfile import write as write_wav
21
  #from IPython.display import Audio
22
  import gradio as gr
@@ -70,15 +70,15 @@ def abstract_to_audio(insert_pdf):
70
 
71
  # Generate audio file that speaks the generated sentence using Bark
72
  # download and load all models
73
- #preload_models()
74
 
75
  # generate audio from text
76
- #audio_array = generate_audio(tss_prompt)
77
- #return (SAMPLE_RATE, audio_array)
78
 
79
- tss_pipeline = pipeline("text-to-speech", "suno/bark")
80
- speech = tss_pipeline(tss_prompt)
81
- return (speech["sampling_rate"], speech["audio"])
82
 
83
 
84
 
 
16
  import transformers
17
  import scipy
18
  from transformers import pipeline
19
+ from bark import SAMPLE_RATE, generate_audio, preload_models
20
  #from scipy.io.wavfile import write as write_wav
21
  #from IPython.display import Audio
22
  import gradio as gr
 
70
 
71
  # Generate audio file that speaks the generated sentence using Bark
72
  # download and load all models
73
+ preload_models()
74
 
75
  # generate audio from text
76
+ audio_array = generate_audio(tss_prompt)
77
+ return (SAMPLE_RATE, audio_array)
78
 
79
+ #tss_pipeline = pipeline("text-to-speech", "suno/bark")
80
+ #speech = tss_pipeline(tss_prompt)
81
+ #return (speech["sampling_rate"], speech["audio"])
82
 
83
 
84