feat(books): add read-aloud generation

Generate a synced read-aloud EPUB from a book's EPUB and audiobook through an
optional STAlign worker (Docker on CPU, or native with MLX on Apple Silicon),
with review, re-sync, replace in place, restart recovery and live progress on
the Files tab. Book details also stack the ebook and audiobook covers when
both exist. See docs/READ_ALOUD.md.
This commit is contained in:
neon
2026-10-21 23:44:37 +00:00
parent 99aa7dce70
commit 992224f2e8
154 changed files with 69074 additions and 271 deletions
+17
View File
@@ -47,6 +47,23 @@ APP_URL=https://bookorbit.example.com
# Node.js JavaScript heap limit in MB. Raise this for very large libraries, 250K+ books.
NODE_MAX_OLD_SPACE_SIZE=2048
# Optional read-aloud generation. Enable the compose profile and use the same random token for
# BookOrbit and its private STAlign worker. The first job per language downloads a speech model
# (about 190 MB) into data/app/read-aloud. Generate the token with: openssl rand -hex 32
# COMPOSE_PROFILES=read-aloud
# READ_ALOUD_WORKER_URL=http://read-aloud-worker:8787
# READ_ALOUD_WORKER_TOKEN=
# READ_ALOUD_WORKER_IMAGE=ghcr.io/bookorbit/bookorbit-read-aloud-worker:latest
# READ_ALOUD_MAX_OUTPUT_BYTES=21474836480
# Folders the worker can read books from, comma-separated. Add a read-only mount for each extra
# library folder to the worker service as well.
# READ_ALOUD_LIBRARY_ROOTS=/books
# The worker image runs on CPU. A native worker on Apple Silicon uses MLX when this is auto; cuda is
# only for a native Linux worker with CUDA 12 and cuDNN 9, and is checked at startup.
# READ_ALOUD_CTC_DEVICE=auto
# READ_ALOUD_CTC_DTYPE=auto
# READ_ALOUD_CTC_BATCH_SIZE=
# --- Optional overrides (uncomment to set) ---
# If you already run your own PostgreSQL, set DATABASE_URL and remove the