Commit 9fafcc1
fix: handle missing speech output in realtime demo
When outputs.speech_outputs is empty or None, the code falls through
to lines that reference audio_duration and rtf (never assigned in the
else branch), causing NameError. It also tries to index
outputs.speech_outputs[0] for save_audio, which would raise IndexError.
Early return when no audio is generated.1 parent 939f1cb commit 9fafcc1
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| |||
0 commit comments