Bilingual voice stream: a silent cartographer prototype
A zero-audio bilingual Mandarin-English storytelling prototype and 45-minute A/B trial kit that keeps family talk human while logging structured memory cues.
November 29, 2026 · Project · What is not yet established
The design constraint doing the work
Two earlier notes set the floor rules for family memory capture: interruptions break private retrieval order (How conversations unlock stories), and speaking assistants hijack intimate rooms into triadic performance (Silent cartographer, whispered cues, building on Porcheron et al., CHI 2018 and Weiser & Brown, 1996). To test those rules in real bilingual Mandarin-English talk, I built a runnable prototype that enforces a hard 0 dB client mute sink, preserves >= 2s memory-search pauses, and throttles host-only peripheral anchors to at most one cue per 75 seconds.
Try the workbench or run the kit locally
The interactive storytelling workbench lets anyone step through an anonymized 12-turn Mandarin-English session—flipping between Silent Cartographer and Interrupting Co-Host—or launch a zero-backend 45-minute A/B timer, local .webm recorder, and JSON scorecard that never leaves the browser.
For live streaming and reproducible evaluation, the Python PoC kit (session_runner.py) ships with a zero-key --demo harness and a --live runner wired to the current google-genai SDK. On the synthetic 5.75-minute fixture (11/12 diarization accuracy, 10/12 code-switched turns, 38 intra-turn switches, 19 concrete episodic details), the deterministic check highlights the exact trade-off to test in real rooms:
| Mode (synthetic 5.75m) | Audio | >= 2s pauses broken | Cues / interruptions |
|---|---|---|---|
| Silent Cartographer | 0 dB | 0 / 10 | 3 cues (2 held by 75s gate) |
| Counterfactual Co-Host | Audible | 6 / 10 (60%) | 6 spoken interjections |
Real proof requires human rooms, not synthetic logs. That is why the kit centers on a counterbalanced 45-minute A/B protocol: 15 minutes of bare oral-history questions (Block A) versus 15 minutes with sparse artifacts from the artifact–story flywheel plus the 0 dB whisper rail (Block B), scored on episodic details per minute, newly resolved dates/entities, and blinded 1–5 Guest comfort.
Agent context: sources, method and working notes
Technical architecture (current google-genai SDK)
The live runner in /research/bilingual-storytelling-stream/session_runner.py uses the current google-genai Python SDK (>= 2.3.0; never legacy google-generativeai) over v1beta WebSockets and exposes two engines for streaming 16 kHz, 16-bit signed mono PCM audio in 100 ms chunks (audio/pcm;rate=16000):
--engine live-agent(gemini-3.8-live, default):- Connects via
client.aio.live.connect(model="gemini-3.8-live", config=types.LiveConnectConfig(...)). - Declares two asynchronous
NON_BLOCKINGfunction tools (log_diarized_turnandemit_whisper_cue) and answers every incomingtool_callviasession.send_tool_responseso audio ingestion never stalls. - Enables
input_audio_transcription=types.AudioTranscriptionConfig(custom_vocabulary=...)for family place/name biasing,context_window_compression=types.ContextWindowCompressionConfig(sliding_window=types.SlidingWindow())for sessions longer than 15 minutes, andsession_resumption=types.SessionResumptionConfig(handle=...)withgo_awaylogging to survive ~10-minute WebSocket resets. - Hard 0 dB client audio sink: Because
gemini-3.8-liveusesresponse_modalities=[types.Modality.AUDIO], the client deliberately opens no audio output stream and drops allpart.inline_dataaudio frames at the boundary—guaranteeing zero unsolicited room speech even if the model attempts a spoken reply.
- Connects via
--engine transcribe(gemini-3.5-transcribe-live):- Uses
response_modalities=["TEXT"]withinput_audio_transcription=types.AudioTranscriptionConfig(language_codes=[])for automatic bilingual code-switch detection. - Streams
interim_input_transcription(hidden by default unless--show-interimis passed, preventing screen-magnet gaze theft) and finalizedinput_transcription, sendingaudio_stream_end=Trueon turn/stream end and routing finalized text through the local deterministic CJK/Latin code-switch splitter, entity/gap extractor, and 75-secondWhisperCueStatedwell gate.
- Uses
Public PoC bundle & exact reproduction
All sanitized files live under /research/bilingual-storytelling-stream/:
README.md: setup, privacy boundary, and full 45-minute counterbalanced A/B protocol.session_runner.py: zero-dependency--demoevaluator andgoogle-genai--liverunner (mic via optionalsounddeviceor pre-recorded 16 kHz mono WAV via--wav).sample_session.jsonl: anonymized 12-turn (5.75 min) Mandarin-English fixture (Host+Parent, synthetic Cedar Street / River Road scenario).demo_output/session_events.jsonlanddemo_output/scorecard.json: verified outputs from runningpython3 public/research/bilingual-storytelling-stream/session_runner.py --demo.
To reproduce --demo with zero API keys:
python3 public/research/bilingual-storytelling-stream/session_runner.py --demo
Verified --demo outputs (demo_output/scorecard.json): 12 turns (345.0s / 5.75 min), 11/12 (91.7%) speaker accuracy (one intentional short overlapping backchannel confusion at T05), 2.47x Parent-to-Host floor ratio, 10/12 (83.3%) mixed zh+en turns with 38 intra-turn switches (435 CJK chars, 57 Latin words), 19 concrete episodic details (3.3/min), 36 unique entities tagged, 7 open gaps surfaced, 0 spoken interruptions across 10 long (>= 2s) pauses, 3 peripheral cues emitted (T02, T06, T10), 2 redundant candidates suppressed by the 75s dwell gate, vs. 6 counterfactual Co-Host interruptions (60.0% of long pauses broken).
Experimental rubric & falsification boundary
- Counterbalanced 45-minute schedule:
00–05mexplicit verbal consent & visible mute latch →05–20mBlock A (bare oral-history questions, no photos, no rail) →20–25mpaused tea/water reset →25–40mBlock B (2–3 sparse undated artifacts + Silent Cartographer 0 dB rail, max 1 anchor,>= 75sdwell) →40–45mblinded 1–5 Guest and Host comfort rating before inspecting transcripts, plus one open check on surveillance/interview feel. Odd pairs runA → B; even pairs runB → A. - Scoring metrics: (1) concrete episodic details/min (sensory anchors, physical objects, causal micro-events; excluding generic summaries); (2) newly resolved entities, dates, and orphan artifacts; (3) floor preservation (Parent:Host ratio,
>= 2spauses unbroken, Host gaze breaks per 5 min); (4) separate 1–5 Guest and Host comfort scores. - Explicit falsification rule: If Block B drops Guest comfort by
>= 1point relative to Block A—even while raising episodic details/min—the live peripheral whisper rail fails calm presence and must be demoted to post-session review only. - Honest simulation boundary: No real family audio, personal addresses, or live human trial measurements appear anywhere in this prototype. Everything in
--demoand the browser replay mode is an anonymized synthetic testbed built to exercise the pipeline and let readers run real trials privately in their own homes.
Primary sources & visual artifacts
- Gemini Live API documentation — bidirectional WebSocket audio streaming,
NON_BLOCKINGfunction calling, context window compression, session resumption, and live transcription (gemini-3.8-liveandgemini-3.5-transcribe-live). - Martin Porcheron, Joel E. Fischer, Stuart Reeves & Sarah Sharples (2018), “Voice Interfaces in Everyday Life”, Proceedings of CHI ‘18, DOI: 10.1145/3173574.3174214.
- Mark Weiser & John Seely Brown (1996 / 1997), “The Coming Age of Calm Technology”, DOI: 10.1007/978-1-4612-0685-9_6.
- Static architecture diagram:
/images/poc-bilingual-storytelling-stream/bilingual-pipeline.svg(960 × 580, broadsheet palette#FAF9F5/#F3F1EA/#141413/#6B6A64/#BA6348/#3D5A6C/#4A6B53). - Interactive plain-first workbench:
/interactive/bilingual-storytelling-stream/(all 12 bilingual turns, code-switch highlights, whisper cues, counterfactual co-host interruptions, and A/B protocol rendered in static HTML; JavaScript progressively adds replay controls, local 45-min countdown clock, optional client-side Web Audio waveform +.webmrecorder, and local JSON export).