AI Voice-Cloned & Print-to-Web Interactive Boardbook Studio

Single-SSOT multimodal studio simultaneously producing 70–90% occlusion peek-a-boo scenes, 39-clip Korean G2P parent-cloned narration, 300 DPI A4 landscape dual PDFs, and an OLED dark sound remote

01 / 01

AI Voice-Cloned & Print-to-Web Interactive Boardbook Studio

This project is a Single Source of Truth (SSOT) multimodal publishing studio engineered to produce peek-a-boo and hidden-object picture books tailored for 12–24 month toddlers—compiling 300 DPI A4 landscape dual print boardbook PDFs and a parent-voice-cloned interactive audio web app (OLED dark sound remote + fullscreen web boardbook) from one unified manifest.

Conventional toddler soundbook production fragments print layouts, voiceover sessions, and digital tap hitboxes across disconnected files and manual handoffs. Furthermore, applying AI voice cloning to toddler storytelling ran into two severe technical obstacles: exaggerated storybook intonation triggered generative safety false positives (FINISH_REASON_INPUT_VR_TAKEDOWN), and Korean grapheme-to-phoneme mismatches degraded natural TTS delivery.

By unifying scene placement and occlusion polygons (scenes.yaml, scenes_manifest.json), 3-tier storytelling scripts (audio_script.yaml), and multi-speaker voice profiles (gemini_voices.json) into one SSOT, the studio links lossless local occlusion recomposition, Korean standard-pronunciation G2P preprocessing, one-take adult-declarative gemini-3.8-flash-tts 39-clip synthesis, cache-proof 300 DPI dual PDF generation, and a low-glare OLED sound remote into a single deterministic pipeline.


1. Visual Control & 70–90% Occlusion Scene Engineering for Toddler Cognition

Between 12 and 24 months, dense patterns and busy backgrounds (visual clutter) overwhelm figure-ground perception. Conversely, placing the protagonist completely unoccluded in the center removes the anticipation and discovery loop that makes peek-a-boo engaging.

code
┌───────────────────────────────────────────────────────────────────────────┐
│  1376×768 Normalized Ruler Canvas (2% / 5% / 10% Grid Coordinate Audit)   │
├───────────────────────────────────────────────────────────────────────────┤
│                                                                           │
│    [Left Hiding Zone]        [Upper-Center Zone]        [Right Zone]      │
│                                                                           │
│                               ┌─────────────────┐                         │
│                               │ +30% touchHitbox│  <- Toddler tap margin  │
│                               │  ┌───────────┐  │                         │
│                               │  │ Character │  │  <- 70–90% visibleRatio │
│                               │  ├───────────┤  │                         │
│                               │  │ Foreground│  │  <- occlusionPolygons   │
│                               └──┴───────────┴──┘                         │
└───────────────────────────────────────────────────────────────────────────┘
  • 3-Zone Gaze Distribution & Clutter Suppression: Using a 1376×768 normalized grid (2%, 5%, 10%), hiding spots are evenly distributed across left, right, and upper-center zones—preventing habitual fixation on the bottom center or room center rug. Character height is standardized to 0.24–0.28 of canvas height in intro spreads (role: "intro") and 0.14–0.18 in exploration spreads (role: "main").
  • 70–90% Visibility Convergence via occlusionPolygons: Foreground props such as apple baskets, potted plants, and cushions mask only the lower or lateral edge of the character with a 1.5px feather, enforcing a visible-pixel ratio (alpha >= 32) of visibleRatio in 0.70–0.90. Automated validation rejects both extremes: below 70% frustrates toddlers, while above 90% dilutes the seek-and-find cue.
  • Automated +30% touchHitbox & Lossless Local Recomposition: After compositing occlusion layers, the manifest derives touchHitboxNormalized by expanding the visible bbox by 30% on both axes to absorb toddler motor imprecision. Adjusting character position or hiding depth runs strictly through local compose-direct -> finalize recomposition without spending additional image generation credits.

2. Korean Standard-Pronunciation G2P Layer & 3-Tier Script Integrity

Even minor pronunciation glitches or unnatural cadence breaks immediately pull a child out of the illusion of hearing their parent's voice. A dedicated preprocessing and verification layer stabilizes Korean phonological rules and personalized noun inflection.

  • Korean G2P Preprocessing & Particle Inflection: The pipeline normalizes tricky Korean orthography-to-phonology transitions (final-consonant liaison conflicts, missed tensification, numeral-classifier compounds, and onomatopoeic cadence). It inspects whether each configured childNickname ends in a final consonant (batchim) and automatically inflects vocative (-a/-ya), nominative (-i/-ga), and comitative (-irang/-rang) particles.
  • Priority-Ranked Breath Tagging (<short pause>): Rather than slicing sentences into disconnected fragments and concatenating clips, full grammatical context is preserved while inserting at most 5 <short pause> tags per clip in priority order: exclamations ("Kkakkoong!"), child nicknames, ellipses, and long clauses (22+ characters).
  • Whisper Back-Transcription with NFD Jamo Normalization: Every synthesized clip is offline-transcribed with faster-whisper, decomposed into NFD Korean Jamo sequences, and gated quantitatively on phoneme similarity (sim >= 0.78), ending completeness (tail >= 0.62), and verified "Kkakkoong" onset detection.

3. Solving VR_TAKEDOWN in Gemini 3.8 Flash TTS Parent Voice Cloning & 39-Clip Packs

Early voice-cloning trials with gemini-3.8-flash-tts repeatedly failed during reference enrollment with FINISH_REASON_INPUT_VR_TAKEDOWN.

  1. Root Cause Diagnosis: Recording reference audio in an exaggerated, high-pitched storybook register produced fundamental frequency spikes (F0 > 350 Hz), causing the model's minor-protection classifier to falsely flag the adult parent as a child voice. Recording the reading sample (source) and consent phrase (consent) in separate takes also introduced microphone-distance and room-reverb drift.
  2. One-Take Adult Chest-Voice Split: Parents record a single continuous take at fixed microphone distance and gain: [20–23s calm adult declarative reading] + [3s dead silence] + [mandatory Korean consent statement]. After 80–85 Hz high-pass filtering, light de-essing (6.5 kHz), and soft compression (1.8:1), faster-whisper word timestamps locate the opening consent token ("나는") and ffmpeg silencedetect cuts cleanly through the exact midpoint of the preceding silence—producing a zero-click 24000 Hz, Mono, 16-bit PCM pair (0.25s silence padding).
  3. Multi-Speaker Cache & Prompt-Driven 3-Tier Prosody: Enrolled voice slots (VOICE_PROFILE_MOM, VOICE_PROFILE_DAD, and extensible PARENT_VOICE_ID entries) are cached in config/gemini_voices.json. During :generateContent, speechMetadata.style acting directions steer the calm adult voice across exploration (prompt), rising anticipation (hint), and celebratory reveal (found)—plus a whispered bedtime lullaby on spread 12—generating 39 clips per speaker (cover + 12 spreads × 3; 78 clips total across Mom & Dad).
code
[Adult Declarative + 3s Silence + Consent One-Take] ──> [faster-whisper + silencedetect Clickless Split]
                                                                       │
[Korean G2P + <short pause> Preprocessing] ──────────> [gemini-3.8-flash-tts + 3-Tier style Direction]
                                                                       │
[found <= 50ms Trim + SFX -22dB Ducking] <─────────────────────────────┘
                 │
                 ▼
[2-Pass EBU R128 (-16 LUFS)] ──> [Whisper Jamo QA Gate] ──> [39-Clip Audio Pack]
  • Toddler Hearing-Safe Mastering: Leading silence on found clips is trimmed to <= 50 ms (lead_pad_ms = 18 ms) for instantaneous response on tap. Gentle marimba and kalimba cues are mixed at -19 to -24 dB (-22 dB ducking during speech pauses) and normalized via 2-Pass ffmpeg loudnorm (-16 LUFS, TP <= -1.5 dBTP, 44100 Hz, 128 kbps AAC .m4a, +faststart).

4. OLED Dark Sound Remote & Fullscreen Web Boardbook

When reading a physical boardbook together, a bright white smartphone screen immediately steals a toddler's gaze away from the printed page. The single web application therefore separates into Mode 1 (Dark Sound Remote) and Mode 2 (Interactive Web Boardbook).

  • Low-Glare OLED Dark Sound Remote: Built on the Instrument Design System v3.5.0 darkroom palette (#16181B matte black ground, <1% #E8661A orange signal, zero overlays on artwork), it minimizes screen luminance while fitting dynamic Mom/Dad speaker toggling and Prompt / Hint / Peek-a-boo triggers inside a single 390×844 viewport.
  • <100 ms Web Audio Preloading & NFC Deep Links: Active scene audio clips are pre-decoded into AudioContext memory buffers on entry to guarantee sub-100ms trigger response. Scanning an NFC tag embedded in a physical page (?scene=XX&clip=prompt) jumps directly to that spread and cleans the URL via history.replaceState.
  • iOS Safari HTTP 206 Range & Letterbox-Inverted Web Boardbook: The media server implements full 206 Partial Content byte streaming (Accept-Ranges: bytes, Content-Range, x-no-compression) for mobile Safari probes. In fullscreen boardbook mode, pointer hits invert the object-fit: contain rendered bounding box to recover true illustration coordinates (nx, ny) independent of letterbox bars, evaluating +30% touchHitbox, >56px palm rejection, and automatic hint playback after 3 misses. All static and API references use ./ relative paths for zero-404 subpath reverse-proxy deployment.

5. Cache-Proof 300 DPI A4 Landscape Dual PDF Build

During print prepress, stale PDF artifacts or Chromium headless file-cache hits could silently embed outdated artwork into press files. The build pipeline enforces strict cache invalidation:

  1. Preemptive Purge & Forced 300 DPI Upscaling: Every build deletes prior PDFs (*_picture_only_A4_landscape.pdf, *_storybook_A4_landscape.pdf) at startup and runs upscaleCleanPrintPages(force=true) to regenerate clean A4 landscape 300 DPI master plates (297×210 mm, 3508×2480 px).
  2. file://...?t=<epoch_ms> Cache Busting & Dual Simultaneous Editions: HTML-to-PDF typesetting appends epoch-millisecond cache-busting query strings to every local asset URI to defeat Chromium disk/memory caching, outputting both a text-free 13-page picture-only boardbook for open-ended narration and a 15-page storybook edition with single-line prompts and a parent answer/reading guide appendix.
  3. Full-Page Rasterized QA Contact Sheet: Immediately after PDF generation, every page is rasterized back into a unified all_12_scenes_qa_sheet.png contact sheet to verify zero margin clipping or layer misalignment before press handoff.

6. Engineering Results & Architectural Impact

Key Metric / Verification GatePrior LimitationFinal Architecture Outcome
Voice Cloning Safety Pass RateFrequent VR_TAKEDOWN rejections on storybook takes0% false rejections via adult declarative one-take split
Korean Pronunciation & QAParticle mismatches & orthographic misreadsStandard G2P + Whisper 100% pass at sim >= 0.78
Reveal Latency & LoudnessLeading silence lag & uneven clip volumefound lead <= 50 ms · uniform -16 LUFS mastering
Toddler Visual & Touch BalanceCenter bias & visual clutter70–90% occlusion · +30% hitbox · >56px palm rejection
Print-to-Web SSOT ParityManual sync across print, audio, and web hitboxesSingle manifest drives 300 DPI dual PDFs + web sync

For an in-depth acoustic breakdown of VR_TAKEDOWN troubleshooting, Korean G2P and <short pause> code, 2-Pass loudnorm, and letterbox-inverted pointerdown geometry, read Gemini TTS Parent Voice Cloning Troubleshooting & 300 DPI Print-to-Web Boardbook Pipeline.

Related Build Logs & Articles

1 post