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

Every Door, One Brain

~14 min · surfaces, deep-links, watchos, macos

Level 0Muted
0 XP0/35 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"Defer Telegram and Council, and just leave them on record. We might never do them." — Dad, 2026-09-26

The Web and Every Sidekick

The WebUI's main chat was the first surface, and the shared hook from Track 1 carried voice mode into every sidekick panel the same day: the prose editor, the music engine, the art studio and the rest all talk like the main chat, because each one renders the same chat view through the same embed and mounts the same hook. A browser still asks for the microphone once per origin, and only over HTTPS or localhost.

The Phone

The native app got the most work, and most of Tracks 4 through 7 happened there first: its own streaming decoder, one owner for the audio session so the talk survives a dark screen, a face screen, a Live Activity that follows the conversation, echo cancellation with the reply on the microphone's own engine. Every change went out through TestFlight to Dad's own phone, where many of the bugs in this quest were found.

The iPhone voice screen while listening: Pippa's face in a rounded teal frame, a seven-bar meter under it, the word 'Listening', a Pause button, and Cut-in and Captions controls at the bottom, with KO at the top right.
The same face on the phone, listening: the teal frame, the same meter, Pause, and the Cut-in and Captions toggles.

The Mac: Firekeeper

Firekeeper, the family's dictation app, became the Mac's door into voice mode. A global hotkey opens a small floating panel for a hands-free talk from any app; its menu can start a talk with any soul, continue a recent voice chat from any surface, or open a private talk that lives only in memory. It doesn't use its own on-device speech engine for this: it listens through cwkPippa's realtime session, so the partial words, the end-of-speech window and the keyterms are exactly the web's and the phone's. The turn rides the brain's own chat route with reply_modality: spoken, on a model slot reserved for voice chat rather than the main one, and a talk is an ordinary conversation that shows up in the sidebar like any other. As Track 7 told, it cuts in by key rather than by voice, and it lets each Mac choose its own microphone and speaker, because remote-desktop software kept taking over the default devices.

The Wrist

The watch has no speech recognizer an app can drive outside its own dictation screen, and it isn't on the family's private network, so its door works through the phone. A Pippa Voice complication takes a dictated message on the wrist, the phone turns it into a dictated, spoken turn, then fetches the finished take in the soul's voice and hands the MP3 back to the watch as a file, not a stream. It was proven on Dad's watch through the speaker and through earbuds, with the crown as the volume knob. A fully hands-free wrist loop exists too: the watch records, decides the end of speech with its own loudness rule, and the phone transcribes; which parts of it are proven on a real wrist and which aren't is written down next to it.

Handing a Thread Across

The interpreter app, Spark, is a case of saying no to a door. Its web sidekick talks like every other. But its phone app has no conversation screen, and Dad ruled it shouldn't grow a voice loop of its own. So Spark's "Talk with Pippa" buttons open the moment's thread in the phone app through a link that names the conversation and the language, and the phone app opens it in voice mode, already listening.

The Doors Not Built

Telegram voice notes and multi-soul Council turns have complete designs in the doc. Dad deferred both and said they may never happen, so the design stays as a record, not a plan. A written-down "not now" is part of the architecture too.

Code

One brain behind every door, and a link that hands a thread to the phone in voice mode·python
from dataclasses import dataclass
from urllib.parse import parse_qs, quote, unquote, urlparse

SCHEME = "cwkpippa"
LANGUAGES = {"ko", "en"}


def voice_link(conversation_id: str, language: str) -> str:
    """A sibling app hands a moment's thread to the phone app, in voice mode."""
    if language not in LANGUAGES:
        raise ValueError("KO or EN, picked by Dad, never auto")
    return f"{SCHEME}://conversation/{quote(conversation_id, safe='')}?voice={language}"


@dataclass(frozen=True)
class OpenRequest:
    conversation_id: str
    listen_in: str | None     # None: open the thread normally, no voice


def parse_link(url: str) -> OpenRequest:
    parts = urlparse(url)
    if parts.scheme != SCHEME or parts.netloc != "conversation":
        raise ValueError(f"not a conversation link: {url}")
    conversation_id = unquote(parts.path.lstrip("/"))    # undo voice_link's quote
    if not conversation_id:
        raise ValueError("missing conversation id")
    voice = parse_qs(parts.query).get("voice", [None])[0]
    return OpenRequest(conversation_id, voice if voice in LANGUAGES else None)


# The doors: every one reaches the same brain with the same two facts.
DOORS = {
    "WebUI main chat":  {"loop": "useVoiceMode hook", "reply": "spoken"},
    "Sidekick panels":  {"loop": "the same hook, inside /embed/<app>", "reply": "spoken"},
    "Phone app":        {"loop": "native loop on the shared voice kit", "reply": "spoken"},
    "Firekeeper (Mac)": {"loop": "native loop, key to cut in", "reply": "spoken"},
    "Watch":            {"loop": "records; the phone transcribes", "reply": "spoken"},
    "Telegram, Council": {"loop": "deferred by Dad's ruling", "reply": None},
}

link = voice_link("conv-1234", "ko")
print(link, "->", parse_link(link))
print(parse_link("cwkpippa://conversation/conv-1234"))
odd = "private/쪽지 #2"                                  # reserved characters round-trip
assert parse_link(voice_link(odd, "en")).conversation_id == odd
for door, how in DOORS.items():
    print(f"{door:18s} {how['reply'] or '-':7s} {how['loop']}")

External links

Exercise

Run the code, then add a door of your own to the DOORS table (a car, a smart speaker, a terminal) and write in one line how it would listen and how it would play. Decide whether it can run the loop itself or should hand off to another surface the way Spark does, and write the link or call it would use.
Hint
Ask two questions about the new door: can it hold a microphone open and play audio with echo cancellation, and can it reach the brain directly? If either answer is no, it is a hand-off door like the watch or Spark: it captures or triggers, and a surface with the full loop does the rest.

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.