Skip to content
Snippets Groups Projects
Commit 0a34202a authored by Andres Marafioti's avatar Andres Marafioti
Browse files

edge case

parent a26395c5
Branches
Tags
No related merge requests found
...@@ -58,7 +58,7 @@ class ChatTTSHandler(BaseHandler): ...@@ -58,7 +58,7 @@ class ChatTTSHandler(BaseHandler):
if self.stream: if self.stream:
wavs = [np.array([])] wavs = [np.array([])]
for gen in wavs_gen: for gen in wavs_gen:
if len(gen[0]) == 0: if gen[0] is None or len(gen[0]) == 0:
self.should_listen.set() self.should_listen.set()
return return
audio_chunk = librosa.resample(gen[0], orig_sr=24000, target_sr=16000) audio_chunk = librosa.resample(gen[0], orig_sr=24000, target_sr=16000)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment