173 lines
9.1 KiB
Markdown
173 lines
9.1 KiB
Markdown
# The Midnight Invitation
|
||
|
||
A complete English Gothic Halloween story, told through postman Elias Ward's
|
||
private delivery diary. A letter in his own handwriting leads him to Thorne Hall,
|
||
where twelve missing guests wait for someone to accept the thirteenth place.
|
||
The suspense comes from borrowed voices, impossible rooms, a false reflection,
|
||
and the gradually uncovered delivery instructions. The main mystery resolves;
|
||
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,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 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:
|
||
|
||
```sh
|
||
python3 tool/compile_midnight_diary.py
|
||
```
|
||
|
||
The compiler preserves puzzle data. It assigns cast segments and a few editorial
|
||
pauses/Foley events. After editing prose, always re-render affected recordings
|
||
before building; stale audio fails the package checker. Puzzle instruction leaves
|
||
remain unvoiced and instructional. Diaries describe the experience of the puzzle;
|
||
they do not provide its solution.
|
||
|
||
## Puzzle design and controls
|
||
|
||
Every picture has one solution and is solvable without assumptions. The first two
|
||
use row/column deductions. The next ten require overlapping-region comparisons,
|
||
with four to eight snapshot reasoning rounds and two to four comparison steps.
|
||
The final chair has no fixed cells but offers a direct first deduction.
|
||
|
||
`puzzle-report.json` contains the spoiler-bearing proof traces. To regenerate the
|
||
same silhouettes' clue sets: `dart run tool/author_midnight_puzzles.dart`.
|
||
|
||
Area buttons have a filled selected state and check mark. A continuous dark frame
|
||
surrounds the selected region's actual cells. The frame ignores pointer input;
|
||
cells still cycle light → cross → clear. The redundant undo button is removed
|
||
from all puzzle pages; hints remain available.
|
||
|
||
## Artwork and notebook
|
||
|
||
The catalogue's `paperAsset` binds `artwork/diary-page-v1.png` to this book's
|
||
reading, contents and puzzle pages. Other books keep their own paper. No island,
|
||
lighthouse or floral decoration appears in this diary background.
|
||
|
||
All fourteen images were generated with the built-in OpenAI image-generation
|
||
tool. `artwork/prompts.json` contains the original thirteen illustration prompts;
|
||
`artwork/diary-page-v1.prompt.txt` records the complete new page prompt. The original
|
||
illustrations retain their transparent alpha; the diary background is opaque.
|
||
Discovery artwork remains hidden until its own puzzle is solved.
|
||
|
||
## Recorded diary and atmosphere
|
||
|
||
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: 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` 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
|
||
ending is quiet. There are no clock ticks before the stopped clock is restarted.
|
||
Separate background loops duck under speech and obey Sound & atmosphere controls.
|
||
The effects inside a reading follow that recording's play/pause/speed controls.
|
||
|
||
Model licences are under `assets/narration/licenses/`. Checksums, durations,
|
||
per-segment voices and cues are recorded in `narration/manifest.json`. WAV masters
|
||
and lossless FLAC archives are excluded from the APK. Atmosphere provenance is
|
||
in `audio/atmosphere_provenance.json`.
|
||
|
||
```sh
|
||
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
|
||
```
|
||
|
||
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
|
||
|
||
```sh
|
||
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,
|
||
checksums, peak levels, effect placement, lossless archive agreement and seamless
|
||
background loops. Tests also cover puzzle uniqueness, progress, read-ahead,
|
||
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 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.
|