Skip to content

Release v0.129.0: a wake-up cancel survives the line's sound-alikes - #155

Merged
tesseractAZ merged 2 commits into
mainfrom
claude/v01290-wakeup-cancel-soundalikes
Nov 24, 2026
Merged

tesseractAZ merged 2 commits into
mainfrom
claude/v01290-wakeup-cancel-soundalikes

Conversation

@tesseractAZ

Copy link
Copy Markdown
Owner

On a G.711 phone line, whisper wrote the spoken word "cancel" as "Campbell." and "Campful." (2026-08-21) and as "Okay, I'm full." and "Campful." (2026-11-23). The second morning, the prompt hint added after the first was already in place. Each time nothing matched, and the wake-up being called off rang.

The wake-up reply (switchboard-stt, time mode)

  • New time_reply(text, parse) -> (stdout, outcome). A pure function. The decision runs in this order:
    • prompt-echo veto;
    • timeparse (times win, as before);
    • the literal cancel regex, unchanged byte for byte;
    • a sound-alike tier;
    • a veto.
  • Sound-alike tier. It answers CANCEL-LIKE when the whole reply (at most two words besides fillers) is shaped like "cancel":
    • a /k/ or /p/ onset, a vowel, a nasal, an optional p/b/k/t, then a fricative or lip stop, a vowel, and an l, with an optional final e;
    • or a lone word starting with "cancel";
    • or "okay, I'm" plus the tail of the word.
  • Veto. A don't, not, didn't, won't, doesn't, keep or leave anywhere stops any cancel. Before, "I don't want to cancel" and "never mind, keep it" cancelled.
  • Prompt echo. A 4-word run of the prompt's own framing does nothing. Read as a reply, the full prompt was 18:53 and its tail a cancel.
  • Logging. One said()-gated log line per outcome, so the privacy scanner now counts 9 sites; its floor is raised to 9.

The wake-up AGI and dialplan

  • CANCEL-LIKE cancels only when a wake-up was set (one hearing, the owner's choice). Otherwise it is a miss. An AGI that predates it compares == "CANCEL", so a version mismatch fails safe.
  • When the attempts run out with a wake-up set, the AGI re-reads the store. A valid entry gives WAKEUP_RESULT=kept, and the dialplan plays the opening recording (sw-wakeup-exists) and the time, instead of "No wake-up call was set", which was false on that path. A doubtful re-read gives none.
  • A recording that RECORD's breadcrumb flags no-speech is not transcribed. The wake-up AGI now leaves the same size-only rec breadcrumb as the operator, through a third twin of rec_summary held equal by test_operator_agi.

timeparse

These replies are no longer read as times:

  • a zero with no other number after it: "Oh.", or whisper's "Oh, oh, oh." on noise, which set midnight;
  • a length of time: "ten more minutes", "one second", which set that hour.

A differential over 1.08 million generated phrases changes only those two kinds of reply.

Evidence

  • Synthetic corpus. 1,334 recordings: 29 macOS voices × 23 phrases × 2 speaking rates, band-limited, µ-law encoded and decoded to Asterisk's 8 kHz WAV. They ran through the add-on's own image, switchboard-stt and whisper base.en, with the live prompt, in a throwaway container with no network.

  • Results. Leaving out one novelty voice, 1,288 recordings:

    • 535 of 560 spoken cancels now cancel, against 516 before;
    • none of the 448 spoken times changed;
    • none of the 728 times and other replies becomes a cancel.

    The channel reproduced "Campbell." on its own, and added "Pencil.", "Can't feel." and "Console it.".

  • Dictionary. Over 234,454 dictionary words, the shape accepts 25, all words nobody says at a wake-up prompt.

Review

  • Design: five readers, three designs and a judge.
  • Review: six lenses, with every finding reproduced by an independent skeptic.
  • Confirmed and fixed:
    • the zero guard covered only one token;
    • durations were read as hours (an older defect);
    • silent recordings were transcribed;
    • untested veto words, echo window, filler list and anchors;
    • the privacy-scan floor.
  • Mutation testing: 41 mutants with a green baseline and every mutant syntax-checked. 40 were killed; the survivor is equivalent (_lead_trim puts a number first).

Tests

  • Suite: 1862 passed.
  • New test_wakeup_cancel.py:
    • live and synthetic renderings;
    • near-words, ordinary replies, veto and echo cases;
    • a sweep of more than 10,000 spoken times that must stay times;
    • zero and duration cases;
    • the AGI on the real store and ledger: cancel, miss, kept, a vanished or odd entry on re-read, and both breadcrumb cases;
    • the privacy policy matrix for the new log lines.

Deploy check

  • extensions.conf gains the kept branch, so its hash changes. pjsip.conf must hash as before.
  • The [wakeup] context must hold GotoIf(... = "kept"]?kept) and n(kept),Playback(switchboard/sw-wakeup-exists).
  • The installed switchboard-stt must hold time_reply, and the installed AGI CANCEL_LIKE.
  • 10/10 services.

🤖 Generated with Claude Code

tesseractAZ and others added 2 commits November 23, 2026 18:06
On a G.711 line "cancel" came back as "Campbell.", "Campful." and
"Okay, I'm full.", so nothing matched and the wake-up being called off
rang (2026-08-21, 2026-11-23). switchboard-stt's time mode now answers
CANCEL-LIKE for a whole reply shaped like "cancel", and the wake-up AGI
acts on it only when a wake-up is set. A don't/not/keep/leave anywhere
stops any cancel; an echo of the prompt does nothing. A call that
understood nothing while a wake-up was set reads it back as still set
(WAKEUP_RESULT=kept). A lone "Oh."/"zero" no longer sets midnight. Each
wake-up recording leaves a size-only breadcrumb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ned shape

- timeparse: a zero with no other number after it ("Oh, oh, oh.", "Oh,
  oh, okay.") and a length of time ("ten more minutes", "one second") are
  not times; both used to replace a set wake-up (midnight, or that hour).
- The wake-up AGI does not transcribe a recording flagged no-speech; the
  attempt is a miss.
- _CANCEL_SHAPE takes a t after the nasal (Can't feel) and a final e
  (Console), from a 1,288-recording synthetic corpus: 535/560 cancels
  caught (516 before), 0 of 728 times/other replies become one.
- Tests pin each veto word, the 4-word echo window, the filler list, the
  tail and shape anchors, digit zero-hours; the privacy scan floor is 9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tesseractAZ
tesseractAZ merged commit c278ea5 into main Nov 24, 2026
11 checks passed
@tesseractAZ
tesseractAZ deleted the claude/v01290-wakeup-cancel-soundalikes branch November 24, 2026 02:05
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