fix(conversation): going on joins within the window even after a short answer ended

With the 3 s wait a short answer can play and end inside the speaker's pause (answer
3-4 s, next piece at 4.7 s): the request was dropped at SpeakEnd and the next piece became
a new request. A request now stays open for call.continueMs after it ended whatever its
answer does; a SpeechStart after the window drops it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-19 22:20:33 +09:00
parent b64097ef0d
commit d7dc62c202
3 changed files with 93 additions and 25 deletions

View File

@@ -34,7 +34,7 @@ Settings (`settings.json`, section `call`; wake words stay in `voice.wakeWords`)
| `call.stopWords` | `["멈춰", "그만", "정지", "stop"]` | Said together with a wake word, they stop Jarvis in any policy. |
| `call.earcon` | `true` | Play the earcon (below) when Jarvis takes a voice call. |
| `call.followUpMs` | `1500` | After a wake word said alone, how long the speaker's next utterance may take to start and still be joined to it. 0-5000. |
| `call.continueMs` | `5000` | Going on (below): how long after a request's utterance ended the speaker's next utterance may start and still be part of it, while its answer has not ended. 0 turns joining off. 0-15000. |
| `call.continueMs` | `5000` | Going on (below): how long after a request's utterance ended the speaker's next utterance may start and still be part of it, also when its answer already played or ended. 0 turns joining off. 0-15000. |
| `call.answerWaitMs` | `3000` | Waiting before answering (below): a voice answer starts playing only once its asker has been quiet this long after their request ended. 0: as soon as it is written. 0-10000. |
Normalisation: Unicode NFKD, lower case, and only letters and digits kept (spaces, punctuation and
@@ -84,9 +84,9 @@ a message is complete as sent.
seconds between them (live 2026-11-19: 0.1-4.7 s inside one thought), and every pause longer than
the worker's `end_silence_ms` ends an utterance. Each piece used to be answered on its own, one after
another, and the answers piled up (user request, 2026-11-19: what is said in pieces is one request).
So a speaker's voice request stays open until its answer has ended (`SpeakEnd`; also while it
plays, since live 2026-11-19 pauses of 2.3-4.7 s were longer than writing the answer and the answer
started in the pause), and while it is open their next final is joined to it when that utterance
So a speaker's voice request stays open for `call.continueMs` after it ended, whatever its answer
does meanwhile (live 2026-11-19 pauses of 2.3-4.7 s were longer than writing the answer: it started,
and a short one even ended, in the pause), and their next final is joined to it when that utterance
started within `call.continueMs` of the request's end (start = the final's arrival minus its
`wait_ms` and `audio_ms`):
- The earlier request is taken back (the policy's `withdraw`): a running answer is stopped (its
@@ -102,8 +102,9 @@ started within `call.continueMs` of the request's end (start = the final's arriv
transcription), the request is held open for that utterance's final, also if its answer starts
playing or even ends meanwhile; the joined request then stops that answer if it still plays. An
empty final or a stop ends the hold, and nothing is asked again.
- Other speakers' utterances never join it. An answer that ended, a missed
request, a stop, leaving and a lost worker end it; then what the speaker says is a new request.
- Other speakers' utterances never join it. The window passing (once the answer ended; a held
request waits for its final), a missed request, a stop, leaving and a lost worker end it; then
what the speaker says is a new request.
- The joined request gets no second earcon when the first one's already played.
- While a request is open, its speaker's partials are sent to get ready as the joined text, also while
its answer is being written (it is the request that will be answered).
@@ -243,9 +244,11 @@ one request, stop all, earcon, prepare, ask "addressed", ask "rank"), so the glu
`Rank { id }` → `rank` with id `k<id>` and the candidates' request ids; `Missed` → a debug log and
the missed list (the last 100: speaker, reason, time and length, never the text).
- `SpeakStart` of an answer's speech: the answer is heard (no second earcon when it is joined); its
request stays open until the answer ends (Going on).
- `SpeakEnd` of an answer's speech is that answer's done. The end of a speech the loop already
cancelled starts nothing.
request stays open (Going on).
- `SpeakEnd` of an answer's speech is that answer's done; its request stays open while
`call.continueMs` from the request's end has not passed (or while held), and a `SpeechStart` of
its speaker after that window drops it. The end of a speech the loop already cancelled starts
nothing.
- `Stopped` (all speech stopped from elsewhere: the slash command, `stop()`, the session ending) and
`Left`: the same stop. The core sends `Stopped` before the `SpeakEnd`s of the speech it stopped, so a
cancelled answer's end never starts the next waiting request.
@@ -266,8 +269,8 @@ no and timeout, the earcon before each answer, once for a wake word alone, none
off, partials that read as a call sent to get ready (joined to a waiting wake word, none while
answering someone else, the joined text while going on), going on (pieces joined into one answer in
every policy without a missed record, a piece without a wake word joined, other speakers never, a
new request once the answer ended or the pause is longer than `call.continueMs`, joined while the
answer plays, answers held until the asker was quiet for `call.answerWaitMs`, longer while they talk
new request once the pause is longer than `call.continueMs`, joined while the answer plays and after
a short answer ended within that window (not another speaker, noise or a stop), answers held until the asker was quiet for `call.answerWaitMs`, longer while they talk
and joined by what they say, released after noise, in every policy, a stop still
stopping, no second earcon, an utterance started before the answer played or before the first final
came still joined, also after a short answer ended, in every policy; an empty final or a stop