Skip to content

feat: add streaming support to /tts endpoint via stream param#140

Merged
devnen merged 1 commit into
devnen:mainfrom
D34DC3N73R:main
May 11, 2026
Merged

feat: add streaming support to /tts endpoint via stream param#140
devnen merged 1 commit into
devnen:mainfrom
D34DC3N73R:main

Conversation

@D34DC3N73R
Copy link
Copy Markdown

Add stream: bool = False to CustomTTSRequest. When true, custom_tts_endpoint returns a StreamingResponse with a streaming WAV header (0xFFFFFFFF size) and PCM chunks yielded as each text chunk is synthesized. Crossfading between chunks reuses existing _crossfade_with_overlap helper. Non-streaming path unchanged.

Add stream: bool = False to CustomTTSRequest. When true, custom_tts_endpoint
returns a StreamingResponse with a streaming WAV header (0xFFFFFFFF size) and
PCM chunks yielded as each text chunk is synthesized. Crossfading between chunks
reuses existing _crossfade_with_overlap helper. Non-streaming path unchanged.
@devnen
Copy link
Copy Markdown
Owner

devnen commented May 11, 2026

Merged, thanks. Clean implementation: opt-in parameter with a safe default, gated streaming branch, existing code path untouched. Appreciate the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants