varl42 commited on
Commit
4ab059a
·
1 Parent(s): c3c915d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -68,7 +68,7 @@ def summarize_text(text):
68
 
69
  # Function to convert text to audio
70
  # Defines a function to convert text to an audio file using Google Text-to-Speech
71
- preload_models()
72
  def text_to_audio(text):
73
  #tts = gTTS(text, lang='en')
74
  #buffer = BytesIO()
@@ -76,8 +76,8 @@ def text_to_audio(text):
76
  #buffer.seek(0)
77
  #return buffer.read()
78
  #######################
79
-
80
- speech_array = generate_audio(summary)
81
  return (SAMPLE_RATE, speech_array)
82
 
83
 
 
68
 
69
  # Function to convert text to audio
70
  # Defines a function to convert text to an audio file using Google Text-to-Speech
71
+
72
  def text_to_audio(text):
73
  #tts = gTTS(text, lang='en')
74
  #buffer = BytesIO()
 
76
  #buffer.seek(0)
77
  #return buffer.read()
78
  #######################
79
+ preload_models()
80
+ speech_array = generate_audio(text)
81
  return (SAMPLE_RATE, speech_array)
82
 
83