From 62c6a79f895ff8b60c525294c76988a88075fc3b Mon Sep 17 00:00:00 2001 From: mikkeli Date: Fri, 9 Oct 2026 16:10:47 +0900 Subject: [PATCH] TTS: chunked utterances; buffer-then-play allowed as a first version Brings the audio sink notes in line with project-yukart decision 12 and ORIN-RUNTIME: the wire format is chunks plus terminator from the start, and the first receiver may buffer to the terminator, so moving to streaming playback is a receiver-only change. Co-Authored-By: Claude Opus 5.5 --- docs/impl/plans/INITIAL.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/impl/plans/INITIAL.md b/docs/impl/plans/INITIAL.md index 9f08025..65891ae 100644 --- a/docs/impl/plans/INITIAL.md +++ b/docs/impl/plans/INITIAL.md @@ -84,8 +84,13 @@ itself, not in a settings page or a startup log. The tablet owns the car's aux input and is the music player, so the Orin's speech has to arrive here to be heard. -- TTS arrives as **discrete utterances** over the reliable channel, not as a - real-time stream. Receive the whole thing, then play it — no jitter buffer. +- TTS arrives as an **utterance: a sequence of chunks with a terminator** over the + reliable channel, never as one opaque file body. Streaming playback (start on + the first chunk, append, finish on the terminator via `AudioTrack` streaming + mode) is the target. +- **Acceptable first version:** buffer the chunks and play on the terminator. With + a non-streaming TTS that is a single chunk anyway. Swapping to streaming then + changes only this receiver, not the protocol or the Orin. - Duck other audio with `AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK` for the duration of the utterance, then release. That is what makes Spotify drop under the voice without either side coordinating.