Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -115,17 +115,15 @@ def tts_fn(slider_value, input_text):
|
|
115 |
|
116 |
def master_fn(slider_value, input_text):
|
117 |
if "." not in input_text:
|
118 |
-
|
119 |
-
return sampling_rate_response, audio_response
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
return sampling_rate_response, audio_response
|
129 |
|
130 |
import gradio as gr
|
131 |
|
|
|
115 |
|
116 |
def master_fn(slider_value, input_text):
|
117 |
if "." not in input_text:
|
118 |
+
input_text += '.'
|
|
|
119 |
|
120 |
+
all_speech = []
|
121 |
+
for sentence in input_text.split(".")[:-1]:
|
122 |
+
sampling_rate_response, audio_chunk_response = tts_fn(slider_value, sentence)
|
123 |
+
all_speech.append(audio_chunk_response)
|
124 |
+
|
125 |
+
audio_response = np.concatenate(all_speech)
|
126 |
+
return sampling_rate_response, audio_response
|
|
|
127 |
|
128 |
import gradio as gr
|
129 |
|