Resolved

TTS system cannot distinguish code segments from regular text audio

Python
TTS
Audio Processing
Text-to-Speech
Kokoro
WhisperX
Multimedia
Dev

Single-voice TTS output lacks auditory distinction between code blocks and narrative text | Implemented dual-voice system with configurable pauses and segment tracking for natural content separation

Issue

The text-to-speech (TTS) system generated indistinguishable audio for both code and narrative text, making it difficult for users to distinguish between technical content and explanations. This created confusion, especially in tutorials where code examples blended with explanatory text.

Culprit

The system used a single voice for all text segments, lacking the ability to differentiate between code and narrative content. This included no segment-type awareness, voice switching capability, or boundary tracking for auditory separation.

Solution

A dual-voice architecture was implemented to use different voices for code segments and regular text. This included configurable pauses for auditory separation, enabling users to clearly distinguish between code examples and explanations. The system maintains backward compatibility while enabling future voice-specific styling and subtitles.