Repository navigation
Add segment streaming and text controls to IndexTTS - #1206
Merged
0xShug0 merged 2 commits intoNov 5, 2026
Merged
Conversation
Owner
|
@david-bowiegxw Thanks! PR merged. I made three minor changes to the PR directly:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose IndexTTS's existing per-segment token budget as a request option and add the IndexTTS 2.5 text normalization switch. IndexTTS 2.0 retains its existing normalization behavior and rejects disabling it. Both variants now support segment streaming through the existing server route: each fully synthesized segment is sent as WAV, including the same inter-segment silence as the final result.
The default token budget (120), normalization and offline route are unchanged. Streaming starts after the first segment is synthesized; this does not expose partially decoded frames. The 2.5 switch disables audio.cpp's normalizer; it does not add the Python implementation's optional NeMo pipeline.
Validation on Apple Silicon / Metal, using local conversions of official 2.0 and 2.5 Q8 checkpoints:
cmake -S . -B build-index -DAUDIOCPP_MODEL_SET=custom -DAUDIOCPP_MODELS=index_tts2 -DENGINE_BUILD_TESTS=ON -DENGINE_ENABLE_OPENMP=OFF -DENGINE_ENABLE_METAL=ON -DCMAKE_BUILD_TYPE=Release; builtaudiocpp_server,audiocpp_cliand the targeted test binaries.build-index/bin/audiocpp_server --config <server.json>with an IndexTTS streaming voice-cloning session and posted three short English sentences with a reference WAV to/v1/tasks/stream, withstream_format: sseand a small segment budget. Both variants emitted 3 WAV fragments, and concatenating their decoded PCM produced exactly the final result's PCM (mono, 16-bit, 22050 Hz). The first chunk arrived before completion (2.0: 4.3 s vs 12.0 s; 2.5: 20.2 s vs 44.7 s in the recorded runs).