When an InterruptionFrame arrives, the Python-side audio task is cancelled but frames already submitted to rtc.AudioSource continue playing from its internal buffer. This causes the bot to keep speaking for several seconds after being interrupted. Fix by overriding process_frame in LiveKitOutputTransport to call audio_source.clear_queue() on InterruptionFrame, immediately flushing the buffered audio.
183 B
183 B
- Fixed
LiveKitOutputTransportnot clearing thertc.AudioSourceinternal buffer on interruption, causing the bot to continue speaking for several seconds after being interrupted.