feat(voice): in a game, partial transcription waits while an answer is written

- the app's ready message says whether the game stage runs (llm ready game=true); the worker then
  holds partial passes while a reply is being written and runs them again, the newest audio per
  speaker, when no answer is; finals never wait; without a game nothing changes
- M0 gamemode_tune decision: the game placement answered 1.7 times faster with partials held
  (64.9 against 37.5 tok/s with a partial pass every 2 s)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-14 10:58:11 +09:00
parent 5316f4e9b0
commit 3d58cf8ab1
8 changed files with 138 additions and 20 deletions

View File

@@ -492,3 +492,14 @@ async fn an_llm_state_set_while_the_worker_connects_again_is_the_last_it_gets()
c.close();
}
}
#[tokio::test]
async fn ready_tells_the_worker_whether_a_game_runs() {
let w = FakeWorker::start(0).await;
let (c, _rx) = client(&w.url(), json!({}));
c.start();
c.wait_ready(Duration::from_secs(2)).await.unwrap();
assert!(c.llm_ready(true));
until(|| w.got().iter().any(|g| *g == Got::Json(json!({"type": "llm", "state": "ready", "game": true})))).await;
c.close();
}