Skip to content

TTS chunking support - #78

Closed
rasmus-z wants to merge 7 commits into
LettuceAI:mainfrom
rasmus-z:tts-chunking
Closed

TTS chunking support#78
rasmus-z wants to merge 7 commits into
LettuceAI:mainfrom
rasmus-z:tts-chunking

Conversation

@rasmus-z

Copy link
Copy Markdown

Added TTS chunking support for the OpenAI compatible text-to-speech system, inspired by the Kokoro one. Highlights the currently speaking chunk.

rasmus-z added 7 commits July 18, 2026 12:00
…nd queued playback as well as highlighting of current playing chunk.
…t_completion Tauri command. On Android, Tauri’s IPC enters through the WebView JavaBridge thread, which has a much smaller stack than normal Rust/Tokio worker threads. The chat_completion async future is apparently too large and causes a stack overflow while Tauri is preparing/spawning the async IPC response.

I changed the Rust command wrappers so the IPC-facing future stays tiny, and the actual large chat flow is spawned onto Tauri’s async runtime. They now do this pattern:

Rust

tauri::async_runtime::spawn(async move {
    super::flows::completion::CompletionFlow::new(app)
        .execute(args)
        .await
})
.await
.map_err(...)?

Instead of directly awaiting the large flow future inside the Tauri command wrapper. This should avoid overflowing the Android JavaBridge stack when pressing Send.
@MegalithOfficial

Copy link
Copy Markdown
Contributor

I will complete my review soon, but in the meantime, please use the conventional commit message format for your future commits/PRs. If you haven't read CONTRIBUTING.md yet, I highly recommend checking it out.

@rasmus-z rasmus-z closed this by deleting the head repository Jul 26, 2026
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