Skip to content
C.W.K.
Stream
Lesson 03 of 06 · published

The Detector Hunt That a Ruling Ended

~13 min · voice-chat, barge-in, echo, measurement, hotkeys

Level 0Unlit
0 XP0/48 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete
"Every attempt was logged, and every attempt failed for the same physical reason. That is when you stop building detectors."

The Feature Everyone Wants

In a spoken conversation you interrupt by talking. Voice assistants call it barge-in: the moment you speak over the reply, the reply stops. Firekeeper built it on day one of Stage 2, and the trouble was immediate. The microphone hears the speakers. If the app cannot tell Pippa's voice coming back through the room from Dad's voice, she interrupts herself.

A Night of Measurements

The first two days were a chain of honest attempts, each logged per reply so the next attempt started from data. Run the reply on the microphone's own audio engine so the system can cancel echo. Vote which mic channel to listen to per utterance. Learn the lag between her voice leaving the speakers and arriving at the mic, and gate on Dad's voice band. Each helped somewhere; none held on office. Office's microphone is a studio interface with 32 inputs, in a room where the monitors reach the mic as loud as Dad does. Apple's voice processing — the echo cancellation every phone call relies on — refuses a 32-channel device. A linear echo canceller topped out near 11 dB. The voice-band gate caught Dad, and still mistook her for him.

attempt                                 result on office's room mic
-------                                 ---------------------------
reply on the mic's engine (system AEC)  AEC refuses a 32-input device
per-utterance channel vote              helped, did not hold
linear echo canceller                   ~11 dB, not enough
Dad's voice band, aligned to echo lag   caught Dad, mistook her
-------
ruling: voice cut-in OFF by default; the key cuts; no more detector work

The Ruling

Echo cancellation runs only on the system's default devices. A USB mic would change nothing unless it became the system default, and switching the default for every talk is not a way to live — Dad had avoided another vendor's voice mode for exactly that, and because it cannot even turn barge-in off. So the ruling closed the hunt instead of extending it: voice cut-in stays, off by default; a key is the sure cut; no more detector or echo work without Dad. The panel shows it as a "Voice cut-in" switch, off. Turn it on and talking over her stops her too, with the caveat its own tooltip states: a room mic that hears the speakers can mistake her for you.

The Key That Takes Nothing

The default cut-in key is Left ⌘ tapped alone. It is only watched, never held: a modifier tap counts when it is pressed and released with nothing in between — no other key, no click, no other modifier joining it, held no longer than a second — so ⌘C, ⌘Tab and ⌘-click never cut her off, and watching it needs no Input Monitoring. Any other key can be chosen; an ordinary key is registered as a hotkey only while she is speaking, so while she speaks it cuts her and never reaches the app in front, and at other times it types normally. Pause is Space, taken only while the panel is the key window, after a Space typed in another app resumed a paused talk. Clicking the face also cuts in while she speaks.

Where the System Does Cancel Echo

On a MacBook's own mic or AirPods, voice processing runs, and voice cut-in rides Apple's cancellation like the phone. Two guards were added there later. A loud chunk in her pitch range (205–360 Hz) does not count, because cancellation lets her through whole for half a second when she starts again after a pause. And since 2026-10-08 a voice trip does not cut at once: her reading drops to a quarter of its volume, and one second later the latest 2.3 seconds go to cwkPippa's speaker check, which cuts only for Dad's voice. An ear that is away or slow cuts anyway — the safe failure for a cut is to stop talking.

A measured dead end deserves a ruling, not another night. When every attempt is logged and every attempt fails for the same physical reason, the next detector is not the answer. Name the constraint (here: echo cancellation exists only on default devices), choose the reliable fallback (a key), keep the feature available but off, and write the ruling down so nobody reopens it by accident.
The device setting survived for a different reason. Each Mac stores its own microphone and speaker by CoreAudio UID, because a remote-desktop app kept seizing the MacBook's defaults mid-talk. A chosen pair that is not the system default runs without echo cancellation — which is exactly why it was never the fix for cut-in.

Code

A bare modifier tap: watched, never held (FirekeeperKit ModifierTap)·swift
public struct ModifierTap {
    public static let maxHoldSeconds: TimeInterval = 1.0
    private var pressedAt: TimeInterval?
    private var inputAtPress: UInt64 = 0

    // flagsChanged: the key went down. `alone` = no other modifier held with it.
    // `input` = the session's running count of key and mouse presses
    // (it moves for ⌘Tab too, which an app's own monitor never sees).
    public mutating func down(alone: Bool, input: UInt64, at time: TimeInterval) {
        pressedAt = alone ? time : nil
        inputAtPress = input
    }

    // Another modifier joined while held: a chord, not a tap.
    public mutating func spoil() { pressedAt = nil }

    // The key came up: a tap only if nothing happened in between.
    public mutating func up(input: UInt64, at time: TimeInterval) -> Bool {
        defer { pressedAt = nil }
        guard let pressedAt else { return false }
        let held = time - pressedAt
        return input == inputAtPress && held >= 0 && held <= Self.maxHoldSeconds
    }
}
// Nothing is intercepted, so ⌘C, ⌘Tab and ⌘-click stay the front app's.

External links

Exercise

Recall a problem you kept attacking with new detectors, heuristics or thresholds. Write down the physical or structural constraint all your attempts ran into. Then write the ruling you could have made: what stays available, what becomes the default, and what nobody reopens without a named reason.
Hint
The tell is that every attempt fails for the same reason. Once you can name that reason, more attempts are spending time on a question already answered. A good ruling keeps the feature for the cases where the constraint does not apply, and makes the reliable path the default everywhere else.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign in — Please sign in to comment.

No comments yet — be the first.