Issue
The text-to-speech (TTS) system was truncating audio output after processing only the first line of multi-line text inputs, resulting in incomplete audio playback. This caused significant audio-video desynchronization, as only a fraction of the input text was converted to speech, leading to missing content and distorted timing.
Culprit
The system prematurely terminated audio processing after the first segment of generated speech, discarding subsequent audio chunks. This occurred due to a misplaced termination instruction in the audio generation loop, which prevented the system from collecting and combining all audio segments into a complete output.
Solution
The audio processing logic was updated to collect all generated speech segments in a sequential manner and concatenate them into a single continuous audio file. This ensured that all input text was accurately converted to speech, restoring proper synchronization between audio and video components.