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:
@@ -379,7 +379,16 @@ impl WorkerClient {
|
||||
|
||||
/// Tell the brain the LLM is `ready` (answer what waited) or `paused` (answer nothing).
|
||||
pub fn llm_state(&self, state: &str) -> bool {
|
||||
let m = json!({"type": "llm", "state": state});
|
||||
self.set_llm(json!({"type": "llm", "state": state}))
|
||||
}
|
||||
|
||||
/// Tell the brain the LLM is ready, and whether a game runs (then partial passes wait while an
|
||||
/// answer is written).
|
||||
pub fn llm_ready(&self, game: bool) -> bool {
|
||||
self.set_llm(json!({"type": "llm", "state": "ready", "game": game}))
|
||||
}
|
||||
|
||||
fn set_llm(&self, m: Value) -> bool {
|
||||
let mut llm = self.inner.llm.lock().unwrap();
|
||||
*llm = Some(m.clone());
|
||||
self.send_json(m)
|
||||
|
||||
Reference in New Issue
Block a user