Skip to content

Lessons in a voice chat: wait for the model's answer; autoplayDelay (0.11.2) - #40

Merged
snakajima merged 2 commits into
mainfrom
wait-for-the-reply
Oct 23, 2026
Merged

snakajima merged 2 commits into
mainfrom
wait-for-the-reply

Conversation

@snakajima

Copy link
Copy Markdown
Contributor

Found in MulmoChat's Japanese voice mode with 0.11.1:

  • the model said "Here comes the sound" in English, because the instruction quoted it;
  • the music's first note played, then paused for that line, then went on.

Why the first note came early

The card appeared after the earlier speech had ended, so the view played at once. The model's answer to the render's result came a moment later and paused the music.

Changes

  • Wait for the answer. In a voice host (one that passes isAudioPlaying), a new card waits up to 3.5 s (REPLY_MS) for the model's answer to the render. The wait counts from when the card appeared, or from the end of the speech it appeared during. After the answer, it waits until the voice has been quiet for 1.5 s, as before.
  • autoplayDelay (renderScore, seconds 0–30): the player waits that long after it appears instead of waiting for the answer, in any host. It is passed in presentation and documented in the tool description, the guide and the plugin README. A score that carries it gets the same "options of the renderScore call" hint as view and autoplay.
  • The model's line. The instruction after a notifyWhenDone render asks for a few words in the language the model speaks with the user, with no quoted example.
  • Hosts without a voice. A host that never passes isAudioPlaying is no longer taken for a voice host. Vue turned the missing boolean prop into false; it now defaults to undefined, and such a host plays at once as before.

Checks

  • Root: lint, typecheck, 715 tests passed (100 skipped). Plugin: typecheck, 197 tests (new: quietWait with the answer wait and autoplayDelay; autoplayDelay passed through and range-checked).
  • In a browser, with a simulated voice:
    • an answer from 1.0 to 2.5 s after the card appeared → playback started at 4.0 s (silent at 3.5 s);
    • no answer → 3.5 s;
    • autoplayDelay: 2 without a voice → 2 s;
    • autoplayDelay: 1 with a voice → 1 s.
  • A host without a voice and no delay could not be checked headless: Chromium refuses playback at page load without a click. The released 0.11.1 behaves the same there.
  • The user tried this build in MulmoChat's voice mode: "とても良くなった" ("much better").

Both packages are 0.11.2; the plugin's peer stays jinglescript ^0.11.0.

🤖 Generated with Claude Code

work in jinglescript

snakajima and others added 2 commits October 23, 2026 11:08
…nglish (0.11.2)

In MulmoChat's Japanese voice mode the model said "Here comes the sound" in
English, as the instruction quoted it, and the first note played before it:
the card appeared after the earlier speech had ended, so it played at once,
and the model's answer to the render came a moment later and paused it.

- A voice host's card now waits up to 3.5 s (REPLY_MS) for that answer,
  counted from when the card appeared or from the end of the speech it
  appeared during, then until the voice has been quiet for 1.5 s.
- renderScore takes autoplayDelay (seconds, 0-30): the player waits that long
  after it appears instead of waiting for the answer, in any host.
- The instruction asks for a few words in the language the model speaks with
  the user, with no quoted example.
- A host that never passes isAudioPlaying is no longer taken for a quiet
  voice host: Vue turned the missing boolean prop into false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A card that appeared during speech counted the delay again from the end of
that speech (a 10 s delay, speech ending at 8 s: played at 18 s). The delay
now counts from the card's appearance, with QUIET_MS after the voice kept
separately. The new test failed before the fix (10000 instead of 2000).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snakajima
snakajima merged commit 28b500e into main Oct 23, 2026
10 checks passed
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.

1 participant