95 lines
5.0 KiB
Markdown
95 lines
5.0 KiB
Markdown
# Mara’s notebook: directed Qwen narration
|
||
|
||
The lighthouse story has 28 complete readings, rewritten for spoken delivery in
|
||
`STORY.md`. Mara's letters and memories use an affectionate older British voice;
|
||
the present-day narrator uses a warm, conversational British male voice. Mara
|
||
also speaks her own dialogue at the tower. The crossing, the clockwork beacon,
|
||
and the return over the exposed causeway form one continuous journey.
|
||
|
||
These are synthetic recordings generated offline with
|
||
[Qwen3-TTS 1.7B VoiceDesign](https://huggingface.co/Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign).
|
||
They replace the former Kokoro recordings in full. The app plays bundled mono
|
||
24 kHz PCM16 WAVs; it does not load a speech model or download audio.
|
||
|
||
## Authoring and performance
|
||
|
||
- `STORY.md`: the editable manuscript, using the existing 28 page IDs. The
|
||
`<!-- Narrator -->` marker separates Mara's letter from present-day narration
|
||
on the window and match-memory pages. It is never displayed or spoken.
|
||
- `cast.json`: stable descriptions of Mara and the narrator.
|
||
- `performance.json`: pinned model revision and acting direction for each scene.
|
||
- `scripts.json`: compiled exact text, cast segments and editorial pauses.
|
||
- `manifest.json`: scripts, actual model instructions, timed cues, source and
|
||
audio checksums, model revision, runtime versions and rendering settings.
|
||
- `wav/`: reviewable PCM16 masters.
|
||
- `assets/audio/narration_*.wav`: byte-identical bundled copies.
|
||
- `assets/audio/narration_*.flac`: lossless archives, excluded from the app bundle.
|
||
- `licenses/QWEN3_TTS_APACHE_2.txt`: Qwen model/code licence. The old Kokoro
|
||
licences remain available for historical provenance.
|
||
|
||
The compiler preserves puzzle grids, clues, artwork links, page IDs and save
|
||
keys. The five letter/memory pages keep Mara as their lead speaker. The other
|
||
pages use the narrator, switching to Mara for her quoted speech. Connected
|
||
passages are grouped into takes of up to 90 words. Each take receives the voice
|
||
description and scene direction through VoiceDesign's `instruct` parameter;
|
||
only manuscript text goes into the speech input.
|
||
|
||
Descriptions and seeds encourage continuity but cannot guarantee identical
|
||
voice timbre across independent generations. Listen for pronunciation, voice
|
||
drift and added or omitted words. Automated transcription is a review aid,
|
||
not a verified transcript or a substitute for listening.
|
||
|
||
## Regenerate and verify
|
||
|
||
Use the existing isolated Qwen runtime described in `docs/voice-audition.md`.
|
||
On this host the RX 6800 requires access to `/dev/kfd` and `/dev/dri`, outside
|
||
the restricted command sandbox. The model is already cached locally.
|
||
|
||
```sh
|
||
python3 tool/compile_mara_story.py
|
||
HF_HOME="$PWD/artifacts/voice-audition/model-cache" \
|
||
artifacts/voice-audition/runtime/rocm/bin/python \
|
||
scripts/render_qwen_narration.py --story-root assets --flac-dir assets/audio \
|
||
--device cuda --offline --batch-size 4 --attention sdpa \
|
||
--work artifacts/mara-qwen
|
||
HF_HOME="$PWD/artifacts/voice-audition/model-cache" \
|
||
artifacts/voice-audition/runtime/rocm/bin/python \
|
||
scripts/review_qwen_narration.py --work artifacts/mara-qwen
|
||
```
|
||
|
||
Add `--publish` to the render command to replace the local bundled assets after
|
||
staging. Initial Qwen publication requires all 28 readings. Raw takes are cached
|
||
by their text, instructions, model revision, settings, batch and seed; rerunning
|
||
uses matching takes and regenerates changed content. `--retake <page-id>:<index>`
|
||
uses a new seed for a specific segment (indices start at 1), saved in the work
|
||
directory. Keep the same work directory, attention mode and batch size when
|
||
resuming. Batched retakes regenerate the other members of their batch as well.
|
||
|
||
```sh
|
||
python3 scripts/check_narration_assets.py
|
||
python3 scripts/render_mara_previews.py
|
||
artifacts/voice-audition/runtime/rocm/bin/python scripts/test_qwen_narration.py
|
||
flutter analyze --no-pub
|
||
flutter test --no-pub
|
||
```
|
||
|
||
The preview exporter writes three atmosphere mixes to
|
||
`artifacts/mara-qwen/listening/` and a full-story playlist to
|
||
`artifacts/mara-qwen/listen.m3u`.
|
||
|
||
The checker verifies displayed text, cast and instructions, cue coverage, PCM
|
||
format and levels, checksums and bit-identical WAV/FLAC decoding. The earlier
|
||
PCM-prefix preservation checks no longer apply because the whole story has
|
||
been rewritten and re-recorded. `baseText` and `continuation` on the two mixed
|
||
pages describe their text and speaker boundary, not an old recording prefix.
|
||
|
||
Playback still supports autoplay after three seconds, pause/resume, stop,
|
||
replay, speed and passage highlighting. Folded notes wait until unfolded;
|
||
page turns and backgrounding stop playback. One control plays the complete
|
||
reading, with the live speaker label following its cues. Atmosphere remains a
|
||
separate layer that ducks beneath speech. Puzzle instruction leaves are unvoiced.
|
||
|
||
No device installation is part of this revision. Future tablet playtests must
|
||
follow the root `AGENTS.md` fresh-install policy. Previous native Kokoro playback
|
||
results do not constitute a device listening check of these new Qwen recordings.
|