edge case

This commit is contained in:
Andres Marafioti
2024-08-28 16:18:16 +02:00
parent a26395c5f3
commit 0a34202ac7

View File

@@ -58,7 +58,7 @@ class ChatTTSHandler(BaseHandler):
if self.stream:
wavs = [np.array([])]
for gen in wavs_gen:
if len(gen[0]) == 0:
if gen[0] is None or len(gen[0]) == 0:
self.should_listen.set()
return
audio_chunk = librosa.resample(gen[0], orig_sr=24000, target_sr=16000)