Migrate Lumen to Dart and Flutter 2.0
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# Bundled diary readings
|
||||
|
||||
Five fixed readings accompany the opening notebook leaves. They are **synthetic narration rendered during development**, using Kokoro v1.0 / `bf_emma` (British female), not human voice-actor recordings. The app only plays files using Android MediaPlayer. It contains no speech model, Android reader integration, runtime synthesis, or audio download.
|
||||
Five fixed readings accompany the opening notebook leaves. They are **synthetic narration rendered during development**, using Kokoro v1.0 / `bf_emma` (British female), not human voice-actor recordings. The app only plays files using just_audio’s platform decoder. It contains no speech model, Android reader integration, runtime synthesis, or audio download.
|
||||
|
||||
- `scripts.json`: exact current non-puzzle text exported from `StoryBook.java`.
|
||||
- `scripts.json`: canonical non-puzzle text loaded directly by the Flutter story pages.
|
||||
- `wav/`: reviewable 24 kHz mono PCM16 WAV masters.
|
||||
- `manifest.json`: model/voice checksums, generator versions, exact scripts, passage timings and FLAC checksums.
|
||||
- `app/src/main/res/raw/narration_*.flac`: lossless bundled copies. FLAC compression is disabled in APK packaging so MediaPlayer can open resource file descriptors.
|
||||
- `assets/audio/narration_*.flac`: lossless bundled copies.
|
||||
- `licenses/`: Kokoro ONNX wrapper MIT and model Apache 2.0 licenses.
|
||||
|
||||
The voice uses generation speed 0.82, short fades, paragraph pauses and peak normalization. The in-app speed control changes playback speed without changing pitch. Pausing preserves the actual recording position; leaving a page releases playback. Readings never autoplay on entry.
|
||||
@@ -14,16 +14,13 @@ The voice uses generation speed 0.82, short fades, paragraph pauses and peak nor
|
||||
|
||||
Generator: [kokoro-onnx](https://github.com/thewh1teagle/kokoro-onnx). Model and voice data: `kokoro-v1.0.onnx` and `voices-v1.0.bin` from its [model-files-v1.0 release](https://github.com/thewh1teagle/kokoro-onnx/releases/tag/model-files-v1.0). See the upstream [voice guide](https://huggingface.co/hexgrad/Kokoro-82M/blob/main/VOICES.md).
|
||||
|
||||
Use Python 3.12, dependencies pinned in `requirements.txt`, ffmpeg and a JDK. Keep model data outside the Android project. Export updated scripts before regenerating:
|
||||
Use Python 3.12, dependencies pinned in `requirements.txt` and ffmpeg. Keep model data outside the app project. Edit the canonical `scripts.json` text before regenerating:
|
||||
|
||||
```sh
|
||||
mkdir -p /tmp/lumen-narration-export
|
||||
javac -d /tmp/lumen-narration-export app/src/main/java/com/lumen/daily/StoryBook.java scripts/ExportNarration.java
|
||||
java -cp /tmp/lumen-narration-export com.lumen.daily.ExportNarration > assets/narration/scripts.json
|
||||
python scripts/render_narration.py --model /path/to/kokoro-v1.0.onnx --voices /path/to/voices-v1.0.bin
|
||||
python3 scripts/check_narration_assets.py
|
||||
```
|
||||
|
||||
The check requires only Python’s standard library, a JDK and ffmpeg. It verifies script freshness, cue coverage, master format, checksums and bit-identical WAV/FLAC decoding. It also rejects Android reader imports in app code. Listen to new takes before accepting them; automated checks cannot judge performance or pronunciation.
|
||||
The check requires only Python’s standard library and ffmpeg. It verifies script freshness, cue coverage, master format, checksums and bit-identical WAV/FLAC decoding. It also rejects Flutter device-reader imports in app code. Listen to new takes before accepting them; automated checks cannot judge performance or pronunciation.
|
||||
|
||||
A future actor recording can replace the masters and bundled assets while preserving stable page IDs. Update passage timings and checksums with that recording; never silently change the written script to fit audio.
|
||||
|
||||
Reference in New Issue
Block a user