Enhance postcard puzzles and narration

This commit is contained in:
Hadrian Burkhardt
2026-11-14 08:55:48 +01:00
parent abaab927d9
commit b19295472d
158 changed files with 5257 additions and 1695 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ Android is the tested target. iOS project scaffolding and test AdMob configurati
- Landscape pages rearrange themselves: a puzzle keeps its whole grid in one column, with the heading, area totals, hint and undo beside it, and the leaf navigation folds into a single row. The board stays fully visible without scrolling, even with larger text.
- Saved reading position, puzzle marks, opened note, inspected repair and viewed pages. Android Back closes the current book and returns to the main page; previous/next leaf controls and swipes turn pages.
- Twelve 7×7 picture puzzles across three chapters, with overlapping-area deductions on entries 3–12. Chapters II and III retain their briefing/puzzle/reveal structure, with swipes between those pages too. Chapter contents shows four entries at a time. Reading ahead keeps unfinished boards and completion awards separate.
- Deterministic daily grids and generated Easy, Medium and Hard 5×5 practice. The grades measure deduction-chain depth, not expert-level difficulty. Every board has a unique solution and needs no guessing.
- Deterministic daily grids and generated Easy, Medium and Hard 7×7 practice. The grades measure deduction-chain depth, not expert-level difficulty. Every board has a unique solution and needs no guessing.
- Undo and optional explained hints in every mode. Each hint, including the first, requires a voluntary rewarded ad and its AdMob reward callback. Declining, closing without a reward or unavailable ads leaves the grid unchanged; solving and reading remain available.
- Expanded story passages connect the harbour key, crossing, bell signals and reunion with Mara. All added passages are narrated; original takes continue seamlessly into the new sections.
- Solved patterns remain available when turning back from discoveries, including after restarting. Discoveries blend the exact pixel symbol into the watercolour, keep a small copy of the symbol visible, and offer a replay.
@@ -25,8 +25,8 @@ Progress starts fresh in Flutter, as requested. Old Java `lumen.xml` saves are *
The bookshelf now puts today's puzzle and **Island postcards** within reach.
Fourteen short outings with Mara add **42 fixed puzzles** and fourteen original
written scenes to collect. Outings never expire; partial grids and collected
postcards are saved independently of the books. The new postcards are English
text without recorded narration; their controls also support German.
postcards are saved independently of the books. The postcards have English Qwen recordings in the island narrator’s voice;
their controls also support German. Each new puzzle is 7×7.
A completed outing can offer one ad after its postcard is read and kept.
Automatic ads have a three-minute opening grace period, three-minute spacing
@@ -168,7 +168,7 @@ example package and validation commands.
Available in the story library in English: a complete three-chapter mystery with
38 leaves, twelve original picture puzzles, thirteen original watercolour
illustrations, its own Gothic notebook background, and 26 cast diary recordings
(about 32 minutes). Read postman Elias Ward’s first-person account of a delivery
(about 29 minutes). Read postman Elias Ward’s first-person account of a delivery
to a house with twelve missing guests and a thirteenth place waiting for him. Every puzzle is uniquely solvable without guessing; the opening two teach
line totals and the remaining ten require overlapping-area comparisons.
+2 -1
View File
@@ -208,5 +208,6 @@
"Keep this postcard": "Postkarte aufbewahren",
"Next pattern →": "Nächstes Muster →",
"Back to postcards": "Zurück zu den Postkarten",
"POSTCARD / {0} / PATTERN {1} OF 3": "POSTKARTE / {0} / MUSTER {1} VON 3"
"POSTCARD / {0} / PATTERN {1} OF 3": "POSTKARTE / {0} / MUSTER {1} VON 3",
"Illustrated postcards · English · Recorded readings": "Illustrierte Postkarten · Englisch · Vertonte Lesungen"
}
+2 -1
View File
@@ -208,5 +208,6 @@
"Keep this postcard": "Keep this postcard",
"Next pattern →": "Next pattern →",
"Back to postcards": "Back to postcards",
"POSTCARD / {0} / PATTERN {1} OF 3": "POSTCARD / {0} / PATTERN {1} OF 3"
"POSTCARD / {0} / PATTERN {1} OF 3": "POSTCARD / {0} / PATTERN {1} OF 3",
"Illustrated postcards · English · Recorded readings": "Illustrated postcards · English · Recorded readings"
}
+11
View File
@@ -0,0 +1,11 @@
# Island postcards
The fourteen files in `illustrations/` were generated separately with the built-in image generation tool. Each scene depicts its corresponding outing: the washing line, bakery, tidal pool, mended pocket, borrowed ladder, rainy shed, ferry letter, bell rope, hill bench, blue cup, kite, evening windows, empty card, and lighthouse lantern room. The common direction was a hand-painted British storybook watercolour and pencil illustration on textured cream paper, with muted sea blues and soft ochres and no lettering. Filenames match the postcard IDs.
`island-postcard-v1.png` was generated using the built-in image generation tool:
> Create a landscape watercolor illustration for the FRONT of a collectible vintage seaside postcard in a cozy illustrated puzzle game. An inviting British island harbour with stone cottage, distant lighthouse on green headland, little fishing boats, laundry and wildflowers, warm afternoon light. Detailed hand-painted watercolor and pencil on textured cream paper, muted sea blues and warm ochres, graceful timeless storybook illustration. The art fills the rectangular frame edge to edge. No postcard borders, no writing, no text, no letters, no stamps, no watermark.
`recordings-source.json` is exported from `lib/domain/postcards.dart` by `dart tool/export_postcards.dart`. `scripts/render_postcards.py` uses the locally cached Qwen3-TTS-12Hz-1.7B-Base model at revision `fd4b254389122332181a7c3db7f27e918eec64e3` and the island narrator from `narration_cottage_compass_memory.wav` as a voice reference. It stages and resumes in `artifacts/postcard-voices`, publishing WAVs only after all fourteen takes complete. The generated audio is synthetic.
A single passage can be regenerated with `scripts/retake_postcard.py`; the script checks that any pronunciation-directed punctuation change preserves the words, saves the selected seed and reassembles the full reading. `scripts/review_postcards.py` provides an offline Whisper transcript comparison. Its flags are review aids, not proof of accuracy or a substitute for listening. `scripts/check_postcards.py` validates bundled PCM format and matches the compiled text to this source.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

File diff suppressed because one or more lines are too long
+26 -13
View File
@@ -65,30 +65,41 @@ 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.
Speech is generated offline with Qwen3-TTS 1.7B and bundled as mono 24 kHz
PCM16 WAV. Iris and Ada retain VoiceDesign takes; Elias and his echo use the
Base model with one shared reference, to improve voice continuity. 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.
- The borrowed voice uses Ada's identity description; the echo shares Elias's
fixed reference, with 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.
For VoiceDesign takes, stage directions go to the model's `instruct` input;
they are never added to the spoken text. The reference-anchored Elias takes do
not use those instructions. Editorial pauses remain; there is no 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.
Elias and the echo are regenerated with `scripts/render_elias_consistent.py`
using the archived `narration/references/elias.wav` VoiceDesign reference and
the pinned Qwen Base model. Iris, Ada
and the borrowed voice retain their original VoiceDesign takes. Base cloning
uses the reference and text; it does **not** consume the scene-specific
VoiceDesign instruction, so its delivery can differ from the directed takes.
The manifest's track-level engine identifies the default VoiceDesign source;
Elias and echo cues override it with their cloning model, reference hash and
batch seed. This improves identity consistency without guaranteeing identical
timbre. `scripts/review_elias_consistent.py` flags possible misreads; listening
remains necessary.
The VoiceDesign renderer below is the original pipeline. Publishing it again for
the whole story will replace the reference-anchored Elias takes; run the Elias
cloning renderer afterwards when rebuilding this mixed cast.
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.
@@ -110,6 +121,8 @@ 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
HF_HOME="$PWD/artifacts/voice-audition/model-cache" HF_HUB_OFFLINE=1 PUBLISH_ELIAS=1 \
artifacts/voice-audition/runtime/rocm/bin/python scripts/render_elias_consistent.py
python3 scripts/render_drama_previews.py
```
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,6 @@
{
"text": "Iris opened a velvet box on the hall table. A black-cat mask lay inside, with one ribbon torn. Under it was a chequered paper pattern.",
"sha256": "79f93d3fc7f63958f80101343067b64837a99e0d7809983ce5ca360f41e01f14",
"source": "midnight.mask.entry VoiceDesign take",
"originalRequestSha256": "bc2a359a5e979d1e72243eae67dcfa87b0c71d0296852a0496171e53d6d10564"
}

Some files were not shown because too many files have changed in this diff Show More