update *** voice reading
Browse files
app.py
CHANGED
@@ -158,7 +158,6 @@ def bot(history, message):
|
|
158 |
history[-1] = tuple(new_tuple)
|
159 |
time.sleep(0.05)
|
160 |
yield history
|
161 |
-
#return history
|
162 |
|
163 |
@spaces.GPU()
|
164 |
def bot_response(message, history):
|
@@ -195,7 +194,7 @@ def voice_player(history):
|
|
195 |
Returns the audio player with the generated response.
|
196 |
"""
|
197 |
_, text = history[-1]
|
198 |
-
text = text.replace("
|
199 |
voice = pipe(text)
|
200 |
voice = gr.Audio(value = (
|
201 |
voice["sampling_rate"],
|
|
|
158 |
history[-1] = tuple(new_tuple)
|
159 |
time.sleep(0.05)
|
160 |
yield history
|
|
|
161 |
|
162 |
@spaces.GPU()
|
163 |
def bot_response(message, history):
|
|
|
194 |
Returns the audio player with the generated response.
|
195 |
"""
|
196 |
_, text = history[-1]
|
197 |
+
text = text.replace("***", "") # For the tts to not read the asterisk of bold text
|
198 |
voice = pipe(text)
|
199 |
voice = gr.Audio(value = (
|
200 |
voice["sampling_rate"],
|