feat(hub): radio Morse mode with WPM speed, per-agent pitch and a 0-100 % speech threshold

Morse keys every picked row whole: class prosign (SOS for MAYDAY), DE with the sender's clear name and the full text, after PARIS timing at the hub's morse.wpm (5-40, default 20) and in the sender's own 550-850 Hz tone from the same sha256 slot as its voice. A higher class cuts a keying row, which keys again whole after it. The speech threshold runs 0-100 % in steps of 10, 100 always open, 0 never. The History card moves into page-radiolog.js to keep page-radioview.js under 500 lines.

🎯 Fix: 85 %
💥 Break: 7 %
💸 Tokens: 100 %
⏱️ Velocity: 100 %
🛡️ Security: 100 %
🏆 Score: 79
🚦 Gate: ⛔ fix 85 % < 90, break 7 % > 5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-15 09:46:05 +00:00
1 parent ded7c9a7b6
commit 86d539a95f
22 files changed
+1147 -286

No files matched your search

+27 -7
View File
@@ -46,10 +46,21 @@
*/
function say(...items) {
speech.pending = items.reduce((pending, item) => Voice.enqueue(pending, item, SPEECH_QUEUE), speech.pending);
preempt();
pump();
drawBubbles();
}
function preempt() {
const {item, source} = speech;
const [first] = speech.pending;
if (item && source && item.playing === "morse" && first && Voice.rank(first) < Voice.rank(item)) {
speech.item = null;
speech.pending = Voice.enqueue(speech.pending, item, SPEECH_QUEUE);
source.stop();
}
}
/**
* @param {object} item the row that sounds now.
* @param {number} span how many of its unread words this sound says: Infinity for the spoken rest, 0 for a procedure word.
@@ -213,19 +224,28 @@
await burst(audio, item);
continue;
}
if (step.kind === "morse") {
voiced = (await keyMorse(audio, item, step)) || voiced;
done -= Number(item.cut);
continue;
}
const failed = await spoken(audio, item, step, done);
if (failed === "dropped") {
done -= 1;
continue;
}
voiced = voiced || (!failed && step.kind === "speech");
if (failed && failed !== "held") {
speechFailed([failed]);
}
if (failed && step.kind === "speech" && speech.item === item && allows(stepOf(item, done), "burst")) {
item.playing = "burst";
await burst(audio, item);
}
await fellBack(audio, item, step, done, failed);
}
}
async function fellBack(audio, item, step, done, failed) {
if (failed && failed !== "held") {
speechFailed([failed]);
}
if (failed && step.kind === "speech" && speech.item === item && allows(stepOf(item, done), "burst")) {
item.playing = "burst";
await burst(audio, item);
}
}