Spaces:
Sleeping
Sleeping
IliaLarchenko
commited on
Commit
•
55d992f
1
Parent(s):
74aa3e4
Fixed TTS error message
Browse files- api/audio.py +2 -2
api/audio.py
CHANGED
@@ -124,9 +124,9 @@ class TTSManager:
|
|
124 |
raise APIError(f"TTS Error: Unexpected error: {e}")
|
125 |
|
126 |
def rlm(self, chat_history):
|
127 |
-
if chat_history:
|
128 |
return self.read_text(chat_history[-1][1])
|
129 |
|
130 |
def rlm_stream(self, chat_history):
|
131 |
-
if chat_history:
|
132 |
yield from self.read_text_stream(chat_history[-1][1])
|
|
|
124 |
raise APIError(f"TTS Error: Unexpected error: {e}")
|
125 |
|
126 |
def rlm(self, chat_history):
|
127 |
+
if len(chat_history) > 0 and chat_history[-1][1]:
|
128 |
return self.read_text(chat_history[-1][1])
|
129 |
|
130 |
def rlm_stream(self, chat_history):
|
131 |
+
if len(chat_history) > 0 and chat_history[-1][1]:
|
132 |
yield from self.read_text_stream(chat_history[-1][1])
|