Expand Lumen stories and add island postcards

This commit is contained in:
Hadrian Burkhardt
2026-11-13 10:18:42 +01:00
parent 7e6b203a02
commit abaab927d9
211 changed files with 10839 additions and 7278 deletions
+78 -35
View File
@@ -10,19 +10,18 @@ the diary ends with an unsettling aftermath. No gameplay timer or graphic gore.
## Content and authoring
- Three chapters, twelve original 7×7 picture puzzles, 38 leaves.
- 4,965 words of first-person diary prose; 26 cast recordings, about 31.9 minutes.
- 4,734 words of first-person diary prose; 26 directed cast readings.
- Thirteen original watercolour illustrations plus a dedicated Gothic diary-page
background with dark binding, raven feather, cracked wax seal and blank paper.
- Stable page, puzzle and story IDs; the revision preserves all existing puzzle
grids, givens, overlapping regions, artwork associations and save keys.
The continuity revision connects the room changes and the objects carried between
them. Ada tries to prevent the delivery; the borrowed voice draws Elias onto the
road. Iris's binding prevents her repairs from holding, while Elias can restore
Lydia's protections. The notebook explains the copied handwriting and voices;
the sewing pattern carries Lydia's instructions into Elias's own stitches. The
clock's connection to the folded chair is established before the final ritual.
The ending distinguishes Iris's escape from the release of the twelve guests.
The spoken-story revision gives Elias a conversational diary voice, Iris a
movement from guarded warnings to hope and grief, and the borrowed voices a
familiar, quietly persuasive delivery. The cooling cakes, the memorial flowers,
and Elias's memory of his mother connect the emotional choices across the story.
The final refusal answers the opening warning. The room transitions, carried
objects, clock mechanism and release of the twelve remain explicit.
`STORY.md` is the editable manuscript. Compile it into `campaign.json`,
`notebook.json` and the exact-text narration scripts with:
@@ -66,20 +65,33 @@ Discovery artwork remains hidden until its own puzzle is solved.
## Recorded diary and atmosphere
Speech is synthetic Kokoro ONNX audio, prepared offline, bundled as mono 24 kHz
PCM16 WAV. No runtime synthesis or downloads. The full diary now uses cast reads:
Speech is generated offline with **Qwen3-TTS 1.7B VoiceDesign**, then bundled
as mono 24 kHz PCM16 WAV. Playback requires no model or download.
- Elias: `bm_george`, 0.93, the writer recalling what happened.
- Iris: `bf_emma`, 0.91, the house's guarded caretaker.
- Ada: `bf_isabella`, 0.94, the postmistress.
- Borrowed voices reuse the imitated person's voice at a slightly slower pace,
gently filtered through the door. Their role labels identify the imitation.
- Elias: an intimate, warm British baritone; a working postman recalling events.
- Iris: a soft, weary British voice, practical under pressure, warmer as hope grows.
- Ada: a mature, rounded British voice with crisp, protective authority.
- The borrowed voice and echo reuse Ada's and Elias's identity descriptions and
seeds, with familiar persuasion and a gentle behind-door filter.
`narration/cast.json` defines roles. `direction` remains editorial metadata, not
an emotion command understood by Kokoro. Exact-text segments preserve quotations,
paragraphs and spoken-role cue timing. Small procedural knocks, chair movement
and paper rustle are placed in pauses, not over words. All original second-person
recordings have been replaced with the matching first-person performances.
`narration/cast.json` holds the stable voice descriptions. The model, pinned
revision, global delivery instruction and all 26 scene directions live in
`narration/performance.json`. The compiler combines those with the manuscript,
assigns dialogue roles, and groups adjacent paragraphs into connected takes of
up to 90 words. Explicit Foley and dramatic silences remain take boundaries.
Stage directions go to the model's `instruct` input; they are never added to the
spoken text. Pacing uses prose, performance instructions and editorial pauses,
not time stretching.
This production uses `generate_voice_design` for each take, so it can receive
scene-specific performance instructions directly. The earlier audition used
VoiceDesign references followed by the Base cloning model. Reusing descriptions
and seeds encourages voice continuity here but does not guarantee identical
timbre across independent takes; listen for drift as well as misread words.
The renderer records the exact instructions and model revision with every page.
Small procedural knocks, chair movement and paper rustle fall in pauses, clear
of the words. One gain adjustment per page preserves the performance's dynamics.
`audio/atmosphere.json` maps scenes across the nocturnal story: wind at the gates,
stove/embers in the kitchen, low air/timber movement in the hall and tower. The
@@ -93,18 +105,50 @@ and lossless FLAC archives are excluded from the APK. Atmosphere provenance is
in `audio/atmosphere_provenance.json`.
```sh
python scripts/render_narration.py \
--model /path/to/kokoro-v1.0.onnx \
--voices /path/to/voices-v1.0.bin \
--story-root assets/stories/midnight-invitation
python scripts/render_drama_atmosphere.py
python3 tool/compile_midnight_diary.py
HF_HOME="$PWD/artifacts/voice-audition/model-cache" \
artifacts/voice-audition/runtime/rocm/bin/python \
scripts/render_qwen_narration.py --device cuda --offline \
--batch-size 4 --attention sdpa --work artifacts/midnight-qwen-full --publish
python3 scripts/render_drama_previews.py
```
Use the pinned narration Python environment for rendering. Repeatable
`--page <page-id>` arguments regenerate selected readings while preserving others.
The preview exporter writes the current door and kitchen readings with background
audio to `artifacts/audio-pilot/`; these local review files are not app assets.
The existing isolated Qwen runtime and cached model are used above; setup is
in `docs/voice-audition.md`. For another host, install `qwen-tts==0.1.1`,
`soundfile`, and a compatible PyTorch build in an isolated environment. Omit
`--offline` for the first model download. On this host GPU rendering needs access
to `/dev/kfd` and `/dev/dri`, outside the restricted command sandbox.
Without `--publish`, outputs remain in the work directory (by default,
`artifacts/midnight-qwen/`; the command above uses `artifacts/midnight-qwen-full/`).
Repeatable
`--page <page-id>` arguments stage selected scenes. Initial Qwen publication
requires the whole diary, preventing a mixture of old and new narration.
Subsequent partial publication requires matching cast, performance and settings.
Raw takes are cached by text, actual instruction, model revision, generation
settings, batch composition, runtime versions and seed; content edits cannot
silently reuse stale speech. A WAV checksum also detects damaged cached takes. Increment
`--take-revision` for a deliberate new render of the whole story. Use
`--retake midnight.opening:1` to retake one segment (indices start at 1); its
new seed is saved in the work directory for resumable rendering. Batched
retakes also regenerate the other takes sharing that batch. Keep the same
work directory, batch size and attention mode when resuming. All selected pages
must render and pass PCM/FLAC checks before any app assets are replaced.
The preview exporter writes door and kitchen readings with atmosphere to
`artifacts/audio-pilot/`; these review files are not app assets. Automated
transcription can flag omissions, repetitions and pronunciation issues, but it
is only a review aid and does not replace listening:
```sh
HF_HOME="$PWD/artifacts/voice-audition/model-cache" \
artifacts/voice-audition/runtime/rocm/bin/python \
scripts/review_qwen_narration.py --work artifacts/midnight-qwen-full
```
This uses the locally cached `openai/whisper-base.en` revision recorded by the
review script. `word-review.json` retains the expected and recognised words,
including false positives such as homophones and proper names.
## Validation
@@ -112,6 +156,7 @@ audio to `artifacts/audio-pilot/`; these local review files are not app assets.
flutter analyze --no-pub
flutter test --no-pub
python3 scripts/check_story_package.py assets/stories/midnight-invitation
artifacts/voice-audition/runtime/rocm/bin/python scripts/test_qwen_narration.py
```
The package checker verifies exact text/script/cue agreement, cast, PCM format,
@@ -121,9 +166,7 @@ translations, all leaves at 1.5× text in both orientations, theme switching and
region-frame alignment with cell hit testing. `integration_test/diary_test.dart`
combines the complete story playthrough and native cast playback checks.
The full revised diary passed 72 Flutter tests, asset verification, and the
Huawei API 26 playthrough (all twelve puzzles, all 26 native recordings,
bookmarks, read-ahead and cast controls). A separate
`integration_test/region_test.dart` captures marked cells inside the selected
block in both orientations, so visual review checks contrast as well as geometry.
Local screenshots are under `artifacts/flutter-check/halloween-*.png`.
The previous Kokoro edition passed a Huawei API 26 playthrough. That result is
historical and does not validate this Qwen revision on a device. No new tablet
installation is performed as part of the manuscript/audio revision. Future
playtest installs must follow the repository's fresh-install policy.