Skip to content

About

Local-first Tauri desktop app that turns DRM-free EPUBs into audiobooks with a Rust pipeline and local TTS models

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AudiobookGen

AudiobookGen is a local-first desktop application that turns DRM-free EPUB books into audiobooks on your own machine. A Next.js interface runs inside a Tauri 2 shell, a Rust workspace handles EPUB import, narration planning, and export, and a managed Python worker runs the speech models: Kokoro 82M by default, with Maya1 3B and a CUDA-only Voxtral 4B as options. A synchronized reader follows the current sentence and lets you jump playback by clicking text. The project exists because narrating a book should not require an account, a subscription, or a cloud upload.

Status

Maintenance. The vertical slice is complete and runs on Linux, Windows, and macOS; the last commit is from 2026-07-17.

Features

  • Import DRM-free EPUB 2 and EPUB 3 packages, review the spine, and include or exclude chapters before narrating.
  • Narrate with three local engines: Kokoro 82M on CPU or GPU, Maya1 3B quantized GGUF, and Voxtral 4B selective INT4 on a 12 GB NVIDIA GPU.
  • Group sentences into deterministic render spans and cache each span by its narration identity, so interrupted jobs resume without regenerating audio.
  • Export per-chapter M4A files, one chaptered M4B, and an EPUB 3 package with Media Overlays.
  • Read along in paginated or scrolling mode with sentence click-to-play and saved reading and listening position.
  • Manage models in-app: first-use runtime install, byte-level download progress, and license acceptance before the Voxtral download.
  • Copy a narrated EPUB plus a progress manifest to USB drives, LAN mounts, or synchronized folders.
  • Keep generating while the window is hidden and inhibit system sleep during active work.
  • Stay fully local after the model download: book text moves only through a stdio pipe to the worker, with no telemetry and no account.

Screenshots

Models page listing the Kokoro 82M, Maya1 3B, and Voxtral 4B narration engines with storage settings

The Models page is the only captured screen so far.

Stack

Layer Tools
Interface Next.js 16 static export, React 19, Zustand, TypeScript, vitest
Desktop shell Tauri 2, SQLite via bundled rusqlite, tokio
Narration compiler Rust workspace: audiobookgen-core (EPUB, text normalization, spans, scheduler, export, sync), audiobookgen-audio (cpal playback, resampling)
Speech worker Python 3.10-3.13: Kokoro, llama-cpp-python plus SNAC (Maya1), PyTorch plus torchao and HQQ (Voxtral)
CI and release GitHub Actions: ci.yml, release.yml with tauri-action

Requirements

  • 64-bit Windows 10/11, macOS on Intel or Apple Silicon, or Linux x86-64.
  • Node.js 22. CI and the release build pin 22; engines in package.json accepts 20.9+.
  • Rust 1.88.0, pinned in rust-toolchain.toml. The workspace MSRV is 1.85.
  • Python 3.10 through 3.13 for the worker. CI uses 3.12.
  • FFmpeg in PATH for M4A, M4B, and narrated-EPUB export.
  • espeak-ng on Linux for Kokoro's out-of-dictionary English fallback.
  • Tauri system libraries: WebView2 on Windows, WebKitGTK 4.1 plus GTK 3 on Linux.
  • Optional GPU paths: an NVIDIA GPU plus the CUDA toolkit for automatic Maya1 acceleration. Direct Voxtral additionally needs Linux, Python 3.12, compute capability 8.0 or newer, and 12 GB VRAM.

Install

npm install

The app normally creates a private Python environment in its application-data directory the first time Kokoro is used. For development, an explicit environment makes iteration faster:

uv venv .venv --python 3.12
uv pip install --python .venv/bin/python -e 'services/tts-worker[dev]' --torch-backend auto
export AUDIOBOOKGEN_PYTHON="$PWD/.venv/bin/python"

On Windows PowerShell, set $env:AUDIOBOOKGEN_PYTHON to the venv Python executable instead.

Configuration

The app reads no config files and no .env file. All settings are environment variables:

Variable Meaning Default
AUDIOBOOKGEN_PYTHON Worker Python interpreter Managed venv under application data
AUDIOBOOKGEN_WORKER_ROOT Worker package root Bundled resource, else services/tts-worker
AUDIOBOOKGEN_FFMPEG FFmpeg executable ffmpeg found on PATH
AUDIOBOOKGEN_UV uv executable for the managed install uv found on PATH
AUDIOBOOKGEN_WORKER_MOCK Set to 1 to run mock engines Unset

Library, model weights, worker venv, and exports live under the application-data directory identified by io.audiobookgen.desktop.

Run

Start the desktop app in development:

npm run tauri -- dev

Build an installable bundle:

npm run tauri -- build

Tagged releases are cut by .github/workflows/release.yml on demand: tauri-action uploads draft pre-releases for Linux x64, Windows x64, and macOS on Intel and Apple Silicon.

Architecture

Next.js static export inside Tauri 2
              | commands and events
              v
Rust desktop shell + audiobookgen-core
  |-- EPUB package inspection and import
  |-- deterministic narration compiler
  |-- SQLite WAL library and progress
  |-- resumable generation scheduler
  |-- render-span artifact store + computed timeline
  |-- M4A / M4B / narrated EPUB export
  `-- accountless folder sync package
              | JSONL control in, framed control/PCM out over stdio
              v
Managed Python worker (services/tts-worker)
  |-- kokoro.py, maya1.py, voxtral.py engines
  |-- priority scheduler + cancellable GPU inference queue
  `-- heartbeat-supervised, typed 24/48 kHz PCM streams

crates/audiobookgen-core owns EPUB parsing, span planning, scheduling, and export. crates/audiobookgen-audio owns playback. apps/desktop/src-tauri exposes Tauri commands and supervises the worker process. src/ is the Next.js interface. The worker never opens a network port. Deeper detail lives in docs/ARCHITECTURE.md, docs/PLATFORMS.md, and docs/RESEARCH.md.

Testing

CI (.github/workflows/ci.yml) runs:

python scripts/validate_repo.py
PYTHONPATH=services/tts-worker python -W error::ResourceWarning -m unittest discover -s services/tts-worker/tests -v
python scripts/e2e_mock_worker.py

npm ci
npm run typecheck
npm test
npm run build

cargo fmt --all -- --check
cargo test -p audiobookgen-core --all-targets
cargo clippy --workspace --all-targets -- -D warnings
cargo check -p audiobookgen-desktop

The Rust job needs a stub frontend dist before checking the desktop crate: mkdir -p out. The repository job runs the worker suite against mock engines, so no model download or GPU is required.

Known limits

  • Image-only fixed-layout pages are displayed but not narrated.
  • PDF, OCR, DRM removal, voice cloning, cloud inference, and Android generation are intentionally out of scope.
  • Maya1 is experimental: its real model load can starve the worker heartbeat (see docs/plans/p4-engine-decisions.md).
  • Direct Voxtral inference is Linux-only with a 12 GB NVIDIA requirement; Windows and macOS use Kokoro or Maya1.
  • Faster-than-real-time generation is not guaranteed on the minimum hardware target.
  • Linux ARM64 is not a build or release target yet.

Credits

  • Kokoro narration model and inference code, Apache-2.0.
  • Maya1 voice-design TTS via llama.cpp GGUF weights and the SNAC decoder.
  • Voxtral weights and reference voices, CC BY-NC 4.0, gated behind explicit acceptance; the adapted voxtral-int4 inference implementation is MIT.
  • FFmpeg, espeak-ng, Tauri, Next.js, and the Rust crate ecosystem.
  • Dependency details: THIRD_PARTY_NOTICES.md and docs/VOXTRAL.md.

License

AGPL-3.0-or-later. See LICENSE. Model weights carry their own terms as listed under Credits.

About

Local-first Tauri desktop app that turns DRM-free EPUBs into audiobooks with a Rust pipeline and local TTS models

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages