This can create chapter-wise audiobooks for your books. But you must have a .EPUB book file
Python
0
96 commits
updated Oct 8, 2026
An end-to-end AI audiobook generator with a Gradio web UI and a Headless CLI pipeline. Upload any book, clone a narrator voice, clean it up, and generate a chapterized, mastered audiobook β all locally or in Google Colab / Kaggle, no cloud APIs needed.
pipeline.py, progress_io.py) β Configurable per-chapter retries (max_chapter_retries: int = 2) with CUDA cache clearing (torch.cuda.empty_cache() and gc.collect()), exponential backoff delay, thread-safe retry persistence (update_chapter_retry), and an automatic end-of-run retry pass (retry_failed_at_end).gpu_pool.py) β Configurable VRAM headroom (vram_headroom_gb: float = 2.0) to compute safe batch sizes on lower-memory GPUs (e.g. 8 GB cards). Includes preflight low-VRAM auto-detection warnings (<= 8.5 GB).pipeline.py) β Enforces minimum WAV file size guard (_MINIMUM_CHAPTER_WAV_BYTES = 10_000) and outputs a top-level generation_summary block (completed/failed counts, failed chapter numbers, ISO timestamp) to generation_progress.json upon run completion.session_end WebSocket events for cloud proxy reliability (Kaggle/Colab).preflight.py) β Validates the full execution environment in under 30 seconds before any model loading or generation begins. Verifies Python version, PyTorch, CUDA count, bfloat16 hardware support, transformers API (BitsAndBytesConfig), soundfile, FFmpeg, voice_ref type/existence, and Python 3.12 dict view picklability. Immediately reports errors with recommendations before spending GPU hours._validate_chunk_file) to detect missing or corrupted files on disk and automatically re-synthesizes them. SHA-256 hash caching (_VOICE_REF_CACHE) prevents redundant temporary WAV writes across chunk synthesis calls.progress_io.py) β Dedicated, thread-safe file I/O layer for generation_progress.json. Uses atomic writes (temp file + os.replace()), module-level write lock (_WRITE_LOCK), UTF-8 BOM auto-decoding, leading garbage stripping, HTML detection, and an atomic read-inside-lock pattern to eliminate TOCTOU race conditions under concurrent GPU execution.AudiobookConfig) β Versioned config contract (_CONFIG_SCHEMA_VERSION = 6) with hardened from_dict() construction, backward-compatible default fallback, unknown key filtering, and human-readable field_summary() diagnostics.GPUPoolManager) β Parallel model warmup via ThreadPoolExecutor during pool creation. Failed/OOM GPU instances are automatically detected and pruned from the active pool, allowing healthy GPUs to continue synthesizing without failing the job.chapter_pipeline.py implements a high-throughput 3-stage pipeline (Stage A: CPU text preparation, Stage B: parallel GPU synthesis workers, Stage C: streaming audio mastering and async disk I/O). Sentence audio chunks are cached incrementally in .temp_chunks/ β if interrupted, generation resumes mid-chapter without re-synthesizing completed chunks.audiobook_rust) β High-performance Rust extension providing 5.5Γ faster audio mastering, SIMD sentence splitting, and ultra-fast text normalization compiled with maturin (with transparent Python fallbacks).cli.py) β Run audiobook generation headless in cloud environments (Kaggle/Colab) or terminal without launching or maintaining a web browser interface. Includes flags for cover art injection (--embed-cover-only), quantization, device selection, and progress file execution.generation_progress.json caches fully extracted and segmented chapter text. Re-parsing large books on session resume is completely eliminated!generation_progress.json and automatically restored when you resume a session β no need to re-select every time. Uploading a book after restoring JSON settings preserves your selected chapter subset automatically..txt file with search==replace pairs to fix how the TTS pronounces specific words.GPUPoolManager) β Automatically detects all available GPUs (e.g. Kaggle T4 Γ 2) and assigns dedicated model instances per GPU. Enables true simultaneous work-stealing parallel execution across GPUs (with VRAM safety guards) for up to 2Γ speedups without OOMs.scripts/colab_prerun_check.py and scripts/kaggle_prerun_check.py run in <5 seconds to verify GPU allocation, VRAM limits, Rust compilation status, and GPU pool dispatch before loading heavy TTS model weights.--quantization int8) β 8-bit model quantization via bitsandbytes reduces VRAM consumption by ~50% for memory-constrained environments.--embed-cover-only) β Instantly inject cover image artwork and ID3 tags into existing output audio files without running TTS generation..lrc timed lyrics, .srt subtitles, and .vtt WebVTT files for sync with Audiobookshelf and media players.torch.compile() Speed Optimization β Enable kernel fusion rendering to compile Qwen3 TTS model via the GPU compiler, speeding up audio generation throughput on RTX GPUs.flash_attn is installed. Uses Flash Attention 2 if available, otherwise gracefully falls back to PyTorch's built-in SDPA β no crashes on T4 or other GPUs that don't have flash_attn.auto mode gives each chapter as many GPUs as it has batches to fill: short chapters run one per GPU, long ones are shared.notebooks/AudiobookMaker_Colab.ipynb) and Kaggle (notebooks/AudiobookMaker_Kaggle.ipynb) with public shareable Gradio links.




AudiobookMaker/
βββ install.sh / install.bat β One-click installer (detects OS + GPU)
βββ run.sh / run.bat β Start app + open browser automatically
βββ app.py β Gradio UI entry point
βββ cli.py β Headless CLI entry point
βββ start_api.py β FastAPI orchestration server launcher
βββ requirements.txt β Core dependencies + Qwen3-TTS
βββ requirements/ β One file per optional engine (tts-<engine>.txt)
βββ notebooks/
β βββ AudiobookMaker_Colab.ipynb β Google Colab notebook (full pipeline, shareable link)
β βββ AudiobookMaker_Kaggle.ipynb β Kaggle notebook (dual-GPU T4x2 support, shareable link)
βββ scripts/
β βββ colab_prerun_check.py β Colab diagnostic check (<5s)
β βββ kaggle_prerun_check.py β Kaggle diagnostic check (<5s)
β βββ lrc_to_srt_converter.py β Convert .lrc files to .srt
βββ audiobook_rust/ β Rust PyO3 extension: sentence splitting, text cleaning, mastering
βββ docs/
β βββ preview/ β UI screenshots
βββ api/
β βββ server.py β FastAPI server (task queue, WebSocket progress streaming)
β βββ worker.py β Background task consumer (concurrent GPU queue)
βββ tests/ β pytest suite (mock engine; no GPU needed)
βββ audiobook_factory/
βββ preflight.py β Automated pre-flight environment validator (<30s check)
βββ pipeline.py β Audiobook generation orchestrator
β (AudiobookConfig, CancelToken, run_pipeline)
βββ chapter_pipeline.py β 3-stage per-chapter pipeline & chunk-level resume
βββ chunk_planner.py β Cuts a chapter into TTS chunks (sentence packing, pauses, script-aware length)
βββ chunk_verifier.py β Checks each chunk (duration, optional Whisper transcript) and triggers re-synthesis
βββ speech_text.py β Rewrites numerals, dates, currency for narration (English)
βββ loudness.py β Loudness normalisation with a look-ahead limiter (Python twin of the Rust code)
βββ extractor_engine.py β Core text extraction engine
β (DocumentIngestor, MLClassifier, TextNormalizer)
βββ text_extractor.py β Public API: scan() + extract()
βββ voice_preprocessor.py β Reference-voice cleaning pipeline
βββ gpu_pool.py β GPU detection, provider pool, device dispatch
βββ filename_sanitizer.py β Cross-platform, Audiobookshelf-compatible filenames
βββ text_processing.py β Sentence splitting + normalisation (Rust or NLTK)
βββ ffmpeg_utils.py β FFmpeg encoding helpers
βββ progress_io.py β Thread-safe atomic progress JSON I/O
βββ utils.py β Shared utilities (LRC timestamping, SRT formatting)
βββ tts_providers/ β One module per TTS engine
βββ base_tts_provider.py β Provider contract + get_tts_provider() factory
βββ registry.py β Which engines exist (lazy imports)
βββ qwen_provider.py β Qwen3-TTS (default)
βββ indextts_provider.py β IndexTTS-2.5 / IndexTTS-2
βββ moss_provider.py β MOSS-TTS
βββ omnivoice_provider.py β OmniVoice
βββ fish_provider.py β Fish Audio S2 Pro
βββ higgs_provider.py β Higgs Audio v3
βββ f5tts_provider.py β F5-TTS
Engine (tts_provider_name) | Weights licence | Commercial use | Min. VRAM* | Batched | Reference transcript | Notes |
|---|---|---|---|---|---|---|
Qwen3-TTS (qwen, default) | Apache-2.0 | yes | 6 GB | yes | optional (improves cloning) | Voice clone, preset speakers, designed voices, saved voice presets |
IndexTTS-2.5 (indextts) | bilibili Model Use License | yes, below 100M MAU / RMB 1B revenue, with conditions | 7 GB | no | not used | Emotion controlled separately from timbre; 22 kHz |
MOSS-TTS (moss) | Apache-2.0 | yes | 11 GB | yes | optional | Duration control, pause tags; ~13 GB download |
OmniVoice (omnivoice) | CC-BY-NC | no | 4 GB | yes | optional | 600+ languages; style is attribute tags, not prose |
Fish Audio S2 Pro (fish) | Fish Audio Research License | no | 12 GB | no | required | 44.1 kHz, inline emotion tags; slower than real time on a T4 |
Higgs Audio v3 (higgs) | Boson research / non-commercial | no (creator grant with attribution) | 11 GB | yes | optional | Ported from the reference server; no official in-process path exists |
F5-TTS (f5tts) | CC-BY-NC-4.0 | no | 3 GB | no | optional | English / Chinese |
* Estimated from weight sizes. Run python cli.py --list-providers for each engine's options and install command.
One engine per environment. The engines pin incompatible transformers versions (IndexTTS 4.52, Qwen 4.57, MOSS exactly 5.0.0, OmniVoice and Higgs 5.3+), so install only the one you use on top of requirements.txt:
pip install -r requirements/tts-<engine>.txt # indextts | moss | omnivoice | fish | higgs
requirements/tts-<engine>.txt lists any second step an engine needs. Read the licence of an engine before publishing audio made with it: the non-commercial ones do not allow selling the result.
Numbers from test runs of this code on two T4 GPUs with one 22-second English narrator clip. Speed is audio produced per second of synthesis; above 1Γ is faster than real time.
| Engine | Speed on 2 GPUs | Gain from the 2nd GPU | English word errors | VRAM per GPU |
|---|---|---|---|---|
| Qwen3-TTS 1.7B | 3.3Γ (long chapters) | 1.6Γ | 3% | 6β13 GB with batch size |
| Higgs Audio v3 | 3.1Γ | 1.6Γ | 4% | 9.4 GB |
| OmniVoice | 0.6Γ | 1.95Γ | 3% | 4β5 GB |
| IndexTTS-2.5 | 0.6Γ | 1.85Γ | 4% | 5.7 GB |
| MOSS-TTS | 0.6Γ | 1.85Γ | 3% | 12.6 GB |
| Fish Audio S2 Pro | 0.5Γ | 1.45Γ | 4% | 11.4 GB |
auto (or chapters): short chapters then run one per GPU. auto was added after these runs and has only been exercised with simulated GPUs.Note: Flash Attention 2 is optional. If the
flash_attnpackage is not installed (e.g. on T4 GPUs in Colab/Kaggle), the app automatically falls back to PyTorch SDPA β no manual action needed.
git clone https://github.com/MSpider3/AudiobookMaker.git
cd AudiobookMaker
The installer automatically:
requirements.txtaudiobook_rust) in release mode (with fallback to pure Python if Rust is not present)install.bat
chmod +x install.sh
./install.sh
The run script activates the environment, starts the server, and opens your browser automatically.
run.bat
chmod +x run.sh
./run.sh
Your browser will open at http://localhost:7860 automatically.
cli.py)For faster generation or execution in cloud environments (Google Colab / Kaggle notebooks) where Gradio tunnels might disconnect, you can run generation headless via cli.py:
# Straight from a book file, no JSON needed:
python cli.py --book /path/to/book.epub --voice-file /path/to/narrator.wav \
--voice-transcript-file /path/to/narrator.txt \
--provider qwen --language English --output-format m4b --single-file
# See the engines, their licences and options:
python cli.py --list-providers
# Check what a run would do without generating anything:
python cli.py --book /path/to/book.epub --voice-file narrator.wav --dry-run
# Basic run with progress JSON (uses cached chapter text):
python cli.py audiobook_output/MyBook/generation_progress.json
# Override book path (for cover image extraction) and narrator voice:
python cli.py generation_progress.json \
--book-path /path/to/book.epub \
--voice-file /path/to/voice.wav
# Override generation parameters on the fly:
python cli.py generation_progress.json \
--worker-count 4 \
--output-format mp3 \
--output-dir ./my_output
# Enable INT8 quantization (reduces VRAM by ~50%):
python cli.py generation_progress.json --quantization int8
# Embed cover image into pre-generated audio files without running TTS:
python cli.py generation_progress.json \
--cover-image /path/to/cover.jpg \
--embed-cover-only
# Force re-processing all chapters from scratch:
python cli.py generation_progress.json --force-reprocess
| Flag | Description |
|---|---|
config_json | Path to generation_progress.json (exported by the UI). Optional when --book is given. |
--book | Generate straight from a book file (EPUB, PDF, TXT, DOCX, ODT, MOBI). |
--book-path | Book file to use with a JSON (for the cover, or when the JSON has no chapter text). |
--chapters | Only run these chapter numbers, e.g. 1-12 or 1,3,5. |
--redo | Regenerate these chapters even if they are finished. |
--provider / --tts-model-name / --tts-option KEY=VALUE | Engine, model and engine-specific options (see --list-providers). |
--language | Language of the text, e.g. English, Hindi. |
--voice-file | Narrator reference clip to clone. |
--voice-transcript / --voice-transcript-file | What is said in the reference clip, as text or as a file. |
--voice-preset | Saved voice preset of the engine, used instead of a clip. |
--single-file | Combine all chapters into one file with chapter markers. |
--speed, --pause, --para-pause, --max-len | Narration pacing and chunk length. |
--verify | Check each chunk: off, duration (default) or asr (Whisper transcript). |
--gpu-count, --batch-size | GPUs to use and chunks per batch (0 = automatic). |
--parallel-mode | chunks (all GPUs share one chapter, default), chapters (one chapter per GPU) or auto (short chapters one per GPU, long ones shared). |
--dry-run / --list-providers | Print the resolved configuration / the available engines, then exit. |
--local | Run in this process even when the API server is up. |
--output-dir | Override destination output directory. |
--output-format | Override audio output format (mp3, flac, wav, m4b). |
--worker-count | Override parallel worker count. |
--device | Select compute device (cuda or cpu). |
--quantization | Model quantization mode (none or int8). |
--cover-image | Supply or override cover image file (.jpg, .png, .webp). |
--embed-cover-only | Instantly embed cover art into existing output audio without TTS. |
--no-resume-chunks | Disable chunk-level disk cache resume and re-synthesize all chunks. |
--force-reprocess | Force re-extraction and re-synthesis of all chapters. |
generation_progress.json containing all settings and embedded chapter text.python cli.py generation_progress.json in your terminal or cloud notebook.You can run AudiobookMaker entirely in cloud notebooks β no local GPU or installation required.
notebooks/AudiobookMaker_Colab.ipynb in Google Colab.!python scripts/colab_prerun_check.py
gradio.live link.notebooks/AudiobookMaker_Kaggle.ipynb in Kaggle.!python scripts/kaggle_prerun_check.py
Verifies both T4 GPUs, VRAM metrics, PyO3 bindings, and multi-GPU pool dispatch in <5 seconds.| Feature / Behavior | Detail |
|---|---|
| Multi-GPU Parallelism | Kaggle T4x2 assigns one model instance per GPU. Long chapters gain about 1.6Γ from the second GPU; for books with short chapters choose Parallelism auto. |
| Other engines | Each optional engine needs its own transformers version, so install one per session (the notebooks have a cell for it). |
| Flash Attention | T4 GPUs don't have flash_attn pre-installed. The app auto-detects this and uses PyTorch SDPA β generation still works flawlessly. |
| Rust Acceleration | Pre-run check compiles audiobook_rust via maturin. If compilation fails, pure-Python fallbacks activate automatically. |
| Chunk-Level Resume | Progress and chunk audio (.temp_chunks/) are cached to disk so you can resume interrupted cloud sessions without losing progress. |
.epub, .mobi, .pdf, .docx, .odt, .txt)1-50, 51-120, 121-250. Each range becomes a separate chapter file.Tip: Your chapter selection is automatically saved to
generation_progress.jsonwhen generation starts. Upload that file later to restore your exact chapter picks without re-selecting.
Upload your raw voice WAV and run any combination of these steps:
| Step | What it does |
|---|---|
| Noise Reduction | Reduces background hiss/hum |
| Noise Gate | Silences frames below a dB threshold |
| High-Pass Filter | Removes low-frequency rumble |
| Silence Removal | Strips long silences between words |
| Normalize Volume | Peaks at your chosen dBFS |
| Formant Shift | Adjust voice gender/timbre (experimental) |
| Resample | Convert to 22k / 44.1k / 48k Hz |
Click βΆ Preview Processed Audio to hear the result, then πΎ Use as narrator voice to pass it to the next tab.
[English] ryan, [Japanese] ono_anna) for the best quality match.min(gpu_count * 4, 8) based on detected GPUs. Thanks to our Multi-GPU Pool architecture (GPUPoolManager), workers dynamically stream work across all available GPUs in parallel with optimal VRAM management.chunks: every GPU shares one chapter (default). chapters: one chapter per GPU. auto: short chapters one per GPU, long ones shared..txt chapter text, .lrc timed lyrics, .srt subtitles, and .vtt WebVTT subtitles alongside audio..txt with one fix per line in search==replace format (regex supported). Comments start with #.
# Fix common TTS mispronunciations
Barbadoes==Barbayduss
N\.E\.==north east
Dr\.==Doctor
generation_progress.json to resume a previous session. All settings (voice, model, format, chapter selection) are automatically restored to the UI.completed in the progress JSON but the audio file is missing on disk, it will be automatically re-generated.Edit audiobook_factory/tts_providers/qwen_provider.py:
# In _load_base_model():
"Qwen/Qwen3-TTS-12Hz-1.7B-Base" # replace with any compatible Qwen3 checkpoint
# In _run_genesis():
"Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign" # design model used once for voice genesis
audiobook_factory/tts_providers/my_provider.pyBaseTTSProvider and implement synthesize(), estimate_cost(), get_name()base_tts_provider.get_tts_provider()tts_provider_dd dropdown in app.pyEdit audiobook_factory/extractor_engine.py:
TextNormalizer._strip_noise() β add/remove markdown patterns to cleanTextNormalizer._fix_isolated_capitals() β font-kerning fixes (e.g. T HE β THE)_SKIP_TOC_TITLE regex β controls which TOC entries are excluded (copyright, gallery, etc.)MLClassifier.predict_is_chapter() β swap in a trained XGBoost model here when readyEdit audiobook_factory/pipeline.py:
lufs: int = -18 # loudness target
true_peak: float = -1.5 # max true peak dBTP
Or adjust these in the UI (LUFS slider in Book tab, True Peak in Advanced tab).
When a chapter cannot reach the loudness target under the true-peak ceiling with gain alone, the peaks in the way are turned down by a look-ahead limiter (audiobook_factory/loudness.py, mirrored in audiobook_rust/src/audio/master.rs).
Edit audiobook_factory/ffmpeg_utils.py β add a new entry to get_format_settings().
Edit audiobook_factory/voice_preprocessor.py:
PreprocessConfig dataclass controls all defaults| Format | Chapter Detection | Fallback |
|---|---|---|
| EPUB | β TOC chapter list | β |
| MOBI | β Try TOC | Page-range picker |
| β | Page-range picker | |
| DOCX | β | Page-range picker |
| ODT | β | Page-range picker |
| TXT | β | Whole book |
| Format | Notes |
|---|---|
| MP3 | Default, most compatible |
| FLAC | Lossless |
| WAV | Uncompressed |
| M4B | Audiobook format with chapter markers (Apple Books) |
Audiobookshelf is a self-hosted audiobook library server. AudiobookMaker generates output that Audiobookshelf automatically detects:
Output filenames follow the {NNNN}_{Chapter_Title}.mp3 format Audiobookshelf expects.
Modern versions of Gradio implement sandbox security checks that restrict browsers from loading server-generated files directly. To ensure seamless operation, AudiobookMaker automatically whitelists the project root directory using allowed_paths=[_ROOT] inside app.py. This enables:
auto mode that hands short chapters out one per GPU.--book), the API lists engines and serves result files, and the repository layout was tidied (notebooks/, scripts/).See CHANGELOG.md for the full list.
pipeline.py, progress_io.py): Automatic chapter retries (max_chapter_retries: int = 2) with CUDA cache clearing (torch.cuda.empty_cache() and gc.collect()), exponential backoff delay, retry persistence (update_chapter_retry), and end-of-run retry pass (retry_failed_at_end).bezzam/VibeVoice-1.5B-hf) and F5-TTS (SWAVE-LAB/F5-TTS) zero-shot voice cloning alongside Qwen3-TTS.vram_headroom_gb: float = 2.0) to calculate safe batch sizes on lower-memory GPUs (e.g. 8 GB cards). Low-VRAM preflight warnings (<= 8.5 GB)._MINIMUM_CHAPTER_WAV_BYTES = 10_000) and outputs a top-level generation_summary block (completed/failed counts, failed chapter numbers, ISO timestamp) to generation_progress.json upon run completion.{"type": "ping"}) and dedicated session_end WebSocket events for cloud proxy reliability (Kaggle/Colab).@app.on_event("shutdown") in FastAPI server to flag task cancellation, flush checkpoints, and shut down GPUPoolManager. Isolated worker task execution in _run_task_safely().preflight.py): run_preflight_checks() validates Python, PyTorch, CUDA count, bfloat16 hardware support, transformers API, soundfile, FFmpeg, voice reference, and Python 3.12 dict view picklability in under 30 seconds before model loading.BaseTTSProvider._validate_voice_ref() boundary validation and SHA-256 hash caching (_VOICE_REF_CACHE) in _resolve_voice_ref() to prevent redundant temp file writes on disk._validate_chunk_file() (minimum size guard = 1,000 bytes). Missing or corrupted chunk files on disk are automatically detected, reported with a stale checkpoint warning, and re-synthesized._sanitize_dict_keys() to cover dict_keys, dict_values, and dict_items view objects across model and generation configs.chapter_pipeline.py, featuring CPU text preparation (Stage A), parallel GPU batch synthesis workers (Stage B), and streaming partial mastering with async disk I/O (Stage C)..temp_chunks/ during generation. Interrupted runs seamlessly pick up from the exact sentence without re-synthesizing completed chunks.audiobook_rust)notebooks/AudiobookMaker_Kaggle.ipynb): Native Kaggle setup supporting GPU T4x2 dual-GPU parallel execution.scripts/colab_prerun_check.py and scripts/kaggle_prerun_check.py to test hardware, PyO3 bindings, and GPU pool dispatch in under 5 seconds before loading model weights.--embed-cover-only flag allows instant injection of cover art and ID3 metadata into existing audio files without triggering model load.--quantization int8 flag via bitsandbytes, cutting model VRAM usage by ~50%..srt subtitle and .vtt WebVTT export alongside .lrc timed lyrics for maximum compatibility across media players and Audiobookshelf.GPUPoolManager and ProviderPool (audiobook_factory/gpu_pool.py), which automatically detects all CUDA devices (e.g. dual Tesla T4s on Kaggle) and loads dedicated model instances per GPU.api/worker.py background consumer loop to run tasks concurrently up to the number of detected GPUs (asyncio.Semaphore).GPU: cuda:0 + cuda:1 (2Γ parallel)), and the Advanced tab worker slider automatically defaults to min(gpu_count * 4, 8).GET /api/v1/health now returns detailed multi-GPU pool status and free/total VRAM metrics per device.generation_progress.json. When you upload a progress file to resume generation, the chapter checkbox list is automatically restored to the exact same selection β no need to manually re-select chapters each time.completed but its audio file is missing on disk.flash_attn to be pre-installed. It detects availability at runtime and gracefully falls back to PyTorch SDPA β preventing crashes on T4 GPUs in Colab/Kaggle and other environments.punkt_tab auto-download: NLTK 3.9+ requires a new punkt_tab resource for sentence tokenization. AudiobookMaker now automatically checks for and downloads both punkt and punkt_tab on startup, preventing pipeline crashes on fresh environments.CancelToken attribute fix: Resolved an AttributeError in the API worker that caused the cancellation flow to crash ('CancelToken' object has no attribute 'cancelled' β fixed to use .is_cancelled).hasattr() guards around all Rust extension calls (clean_text, normalize_text, split_sentences, master_audio). The pipeline continues with pure-Python implementations if the Rust module was compiled without certain functions.This project would not have been possible without the incredible work from these projects:
The voice cloning and TTS engine powering high-quality audio generation. State-of-the-art text-to-speech with zero-shot voice cloning from a short reference clip.
Optional TTS engines; each is used under its own licence (see TTS engines).
Fast, lightweight zero-shot text-to-speech voice cloning model integrated as a provider option in AudiobookMaker.
The voice preprocessing pipeline in this project (noise reduction, noise gate, high-pass filter, silence removal, formant shifting) is directly inspired by the preprocessing architecture used in Mangio-RVC-Fork.
AGPL-3.0-or-later β see LICENSE and NOTICE.
NOTICE grants an additional permission to combine AudiobookMaker with them.This can create chapter-wise audiobooks for your books. But you must have a .EPUB book file
Python
0
96 commits
updated Oct 8, 2026
An end-to-end AI audiobook generator with a Gradio web UI and a Headless CLI pipeline. Upload any book, clone a narrator voice, clean it up, and generate a chapterized, mastered audiobook β all locally or in Google Colab / Kaggle, no cloud APIs needed.
pipeline.py, progress_io.py) β Configurable per-chapter retries (max_chapter_retries: int = 2) with CUDA cache clearing (torch.cuda.empty_cache() and gc.collect()), exponential backoff delay, thread-safe retry persistence (update_chapter_retry), and an automatic end-of-run retry pass (retry_failed_at_end).gpu_pool.py) β Configurable VRAM headroom (vram_headroom_gb: float = 2.0) to compute safe batch sizes on lower-memory GPUs (e.g. 8 GB cards). Includes preflight low-VRAM auto-detection warnings (<= 8.5 GB).pipeline.py) β Enforces minimum WAV file size guard (_MINIMUM_CHAPTER_WAV_BYTES = 10_000) and outputs a top-level generation_summary block (completed/failed counts, failed chapter numbers, ISO timestamp) to generation_progress.json upon run completion.session_end WebSocket events for cloud proxy reliability (Kaggle/Colab).preflight.py) β Validates the full execution environment in under 30 seconds before any model loading or generation begins. Verifies Python version, PyTorch, CUDA count, bfloat16 hardware support, transformers API (BitsAndBytesConfig), soundfile, FFmpeg, voice_ref type/existence, and Python 3.12 dict view picklability. Immediately reports errors with recommendations before spending GPU hours._validate_chunk_file) to detect missing or corrupted files on disk and automatically re-synthesizes them. SHA-256 hash caching (_VOICE_REF_CACHE) prevents redundant temporary WAV writes across chunk synthesis calls.progress_io.py) β Dedicated, thread-safe file I/O layer for generation_progress.json. Uses atomic writes (temp file + os.replace()), module-level write lock (_WRITE_LOCK), UTF-8 BOM auto-decoding, leading garbage stripping, HTML detection, and an atomic read-inside-lock pattern to eliminate TOCTOU race conditions under concurrent GPU execution.AudiobookConfig) β Versioned config contract (_CONFIG_SCHEMA_VERSION = 6) with hardened from_dict() construction, backward-compatible default fallback, unknown key filtering, and human-readable field_summary() diagnostics.GPUPoolManager) β Parallel model warmup via ThreadPoolExecutor during pool creation. Failed/OOM GPU instances are automatically detected and pruned from the active pool, allowing healthy GPUs to continue synthesizing without failing the job.chapter_pipeline.py implements a high-throughput 3-stage pipeline (Stage A: CPU text preparation, Stage B: parallel GPU synthesis workers, Stage C: streaming audio mastering and async disk I/O). Sentence audio chunks are cached incrementally in .temp_chunks/ β if interrupted, generation resumes mid-chapter without re-synthesizing completed chunks.audiobook_rust) β High-performance Rust extension providing 5.5Γ faster audio mastering, SIMD sentence splitting, and ultra-fast text normalization compiled with maturin (with transparent Python fallbacks).cli.py) β Run audiobook generation headless in cloud environments (Kaggle/Colab) or terminal without launching or maintaining a web browser interface. Includes flags for cover art injection (--embed-cover-only), quantization, device selection, and progress file execution.generation_progress.json caches fully extracted and segmented chapter text. Re-parsing large books on session resume is completely eliminated!generation_progress.json and automatically restored when you resume a session β no need to re-select every time. Uploading a book after restoring JSON settings preserves your selected chapter subset automatically..txt file with search==replace pairs to fix how the TTS pronounces specific words.GPUPoolManager) β Automatically detects all available GPUs (e.g. Kaggle T4 Γ 2) and assigns dedicated model instances per GPU. Enables true simultaneous work-stealing parallel execution across GPUs (with VRAM safety guards) for up to 2Γ speedups without OOMs.scripts/colab_prerun_check.py and scripts/kaggle_prerun_check.py run in <5 seconds to verify GPU allocation, VRAM limits, Rust compilation status, and GPU pool dispatch before loading heavy TTS model weights.--quantization int8) β 8-bit model quantization via bitsandbytes reduces VRAM consumption by ~50% for memory-constrained environments.--embed-cover-only) β Instantly inject cover image artwork and ID3 tags into existing output audio files without running TTS generation..lrc timed lyrics, .srt subtitles, and .vtt WebVTT files for sync with Audiobookshelf and media players.torch.compile() Speed Optimization β Enable kernel fusion rendering to compile Qwen3 TTS model via the GPU compiler, speeding up audio generation throughput on RTX GPUs.flash_attn is installed. Uses Flash Attention 2 if available, otherwise gracefully falls back to PyTorch's built-in SDPA β no crashes on T4 or other GPUs that don't have flash_attn.auto mode gives each chapter as many GPUs as it has batches to fill: short chapters run one per GPU, long ones are shared.notebooks/AudiobookMaker_Colab.ipynb) and Kaggle (notebooks/AudiobookMaker_Kaggle.ipynb) with public shareable Gradio links.




AudiobookMaker/
βββ install.sh / install.bat β One-click installer (detects OS + GPU)
βββ run.sh / run.bat β Start app + open browser automatically
βββ app.py β Gradio UI entry point
βββ cli.py β Headless CLI entry point
βββ start_api.py β FastAPI orchestration server launcher
βββ requirements.txt β Core dependencies + Qwen3-TTS
βββ requirements/ β One file per optional engine (tts-<engine>.txt)
βββ notebooks/
β βββ AudiobookMaker_Colab.ipynb β Google Colab notebook (full pipeline, shareable link)
β βββ AudiobookMaker_Kaggle.ipynb β Kaggle notebook (dual-GPU T4x2 support, shareable link)
βββ scripts/
β βββ colab_prerun_check.py β Colab diagnostic check (<5s)
β βββ kaggle_prerun_check.py β Kaggle diagnostic check (<5s)
β βββ lrc_to_srt_converter.py β Convert .lrc files to .srt
βββ audiobook_rust/ β Rust PyO3 extension: sentence splitting, text cleaning, mastering
βββ docs/
β βββ preview/ β UI screenshots
βββ api/
β βββ server.py β FastAPI server (task queue, WebSocket progress streaming)
β βββ worker.py β Background task consumer (concurrent GPU queue)
βββ tests/ β pytest suite (mock engine; no GPU needed)
βββ audiobook_factory/
βββ preflight.py β Automated pre-flight environment validator (<30s check)
βββ pipeline.py β Audiobook generation orchestrator
β (AudiobookConfig, CancelToken, run_pipeline)
βββ chapter_pipeline.py β 3-stage per-chapter pipeline & chunk-level resume
βββ chunk_planner.py β Cuts a chapter into TTS chunks (sentence packing, pauses, script-aware length)
βββ chunk_verifier.py β Checks each chunk (duration, optional Whisper transcript) and triggers re-synthesis
βββ speech_text.py β Rewrites numerals, dates, currency for narration (English)
βββ loudness.py β Loudness normalisation with a look-ahead limiter (Python twin of the Rust code)
βββ extractor_engine.py β Core text extraction engine
β (DocumentIngestor, MLClassifier, TextNormalizer)
βββ text_extractor.py β Public API: scan() + extract()
βββ voice_preprocessor.py β Reference-voice cleaning pipeline
βββ gpu_pool.py β GPU detection, provider pool, device dispatch
βββ filename_sanitizer.py β Cross-platform, Audiobookshelf-compatible filenames
βββ text_processing.py β Sentence splitting + normalisation (Rust or NLTK)
βββ ffmpeg_utils.py β FFmpeg encoding helpers
βββ progress_io.py β Thread-safe atomic progress JSON I/O
βββ utils.py β Shared utilities (LRC timestamping, SRT formatting)
βββ tts_providers/ β One module per TTS engine
βββ base_tts_provider.py β Provider contract + get_tts_provider() factory
βββ registry.py β Which engines exist (lazy imports)
βββ qwen_provider.py β Qwen3-TTS (default)
βββ indextts_provider.py β IndexTTS-2.5 / IndexTTS-2
βββ moss_provider.py β MOSS-TTS
βββ omnivoice_provider.py β OmniVoice
βββ fish_provider.py β Fish Audio S2 Pro
βββ higgs_provider.py β Higgs Audio v3
βββ f5tts_provider.py β F5-TTS
Engine (tts_provider_name) | Weights licence | Commercial use | Min. VRAM* | Batched | Reference transcript | Notes |
|---|---|---|---|---|---|---|
Qwen3-TTS (qwen, default) | Apache-2.0 | yes | 6 GB | yes | optional (improves cloning) | Voice clone, preset speakers, designed voices, saved voice presets |
IndexTTS-2.5 (indextts) | bilibili Model Use License | yes, below 100M MAU / RMB 1B revenue, with conditions | 7 GB | no | not used | Emotion controlled separately from timbre; 22 kHz |
MOSS-TTS (moss) | Apache-2.0 | yes | 11 GB | yes | optional | Duration control, pause tags; ~13 GB download |
OmniVoice (omnivoice) | CC-BY-NC | no | 4 GB | yes | optional | 600+ languages; style is attribute tags, not prose |
Fish Audio S2 Pro (fish) | Fish Audio Research License | no | 12 GB | no | required | 44.1 kHz, inline emotion tags; slower than real time on a T4 |
Higgs Audio v3 (higgs) | Boson research / non-commercial | no (creator grant with attribution) | 11 GB | yes | optional | Ported from the reference server; no official in-process path exists |
F5-TTS (f5tts) | CC-BY-NC-4.0 | no | 3 GB | no | optional | English / Chinese |
* Estimated from weight sizes. Run python cli.py --list-providers for each engine's options and install command.
One engine per environment. The engines pin incompatible transformers versions (IndexTTS 4.52, Qwen 4.57, MOSS exactly 5.0.0, OmniVoice and Higgs 5.3+), so install only the one you use on top of requirements.txt:
pip install -r requirements/tts-<engine>.txt # indextts | moss | omnivoice | fish | higgs
requirements/tts-<engine>.txt lists any second step an engine needs. Read the licence of an engine before publishing audio made with it: the non-commercial ones do not allow selling the result.
Numbers from test runs of this code on two T4 GPUs with one 22-second English narrator clip. Speed is audio produced per second of synthesis; above 1Γ is faster than real time.
| Engine | Speed on 2 GPUs | Gain from the 2nd GPU | English word errors | VRAM per GPU |
|---|---|---|---|---|
| Qwen3-TTS 1.7B | 3.3Γ (long chapters) | 1.6Γ | 3% | 6β13 GB with batch size |
| Higgs Audio v3 | 3.1Γ | 1.6Γ | 4% | 9.4 GB |
| OmniVoice | 0.6Γ | 1.95Γ | 3% | 4β5 GB |
| IndexTTS-2.5 | 0.6Γ | 1.85Γ | 4% | 5.7 GB |
| MOSS-TTS | 0.6Γ | 1.85Γ | 3% | 12.6 GB |
| Fish Audio S2 Pro | 0.5Γ | 1.45Γ | 4% | 11.4 GB |
auto (or chapters): short chapters then run one per GPU. auto was added after these runs and has only been exercised with simulated GPUs.Note: Flash Attention 2 is optional. If the
flash_attnpackage is not installed (e.g. on T4 GPUs in Colab/Kaggle), the app automatically falls back to PyTorch SDPA β no manual action needed.
git clone https://github.com/MSpider3/AudiobookMaker.git
cd AudiobookMaker
The installer automatically:
requirements.txtaudiobook_rust) in release mode (with fallback to pure Python if Rust is not present)install.bat
chmod +x install.sh
./install.sh
The run script activates the environment, starts the server, and opens your browser automatically.
run.bat
chmod +x run.sh
./run.sh
Your browser will open at http://localhost:7860 automatically.
cli.py)For faster generation or execution in cloud environments (Google Colab / Kaggle notebooks) where Gradio tunnels might disconnect, you can run generation headless via cli.py:
# Straight from a book file, no JSON needed:
python cli.py --book /path/to/book.epub --voice-file /path/to/narrator.wav \
--voice-transcript-file /path/to/narrator.txt \
--provider qwen --language English --output-format m4b --single-file
# See the engines, their licences and options:
python cli.py --list-providers
# Check what a run would do without generating anything:
python cli.py --book /path/to/book.epub --voice-file narrator.wav --dry-run
# Basic run with progress JSON (uses cached chapter text):
python cli.py audiobook_output/MyBook/generation_progress.json
# Override book path (for cover image extraction) and narrator voice:
python cli.py generation_progress.json \
--book-path /path/to/book.epub \
--voice-file /path/to/voice.wav
# Override generation parameters on the fly:
python cli.py generation_progress.json \
--worker-count 4 \
--output-format mp3 \
--output-dir ./my_output
# Enable INT8 quantization (reduces VRAM by ~50%):
python cli.py generation_progress.json --quantization int8
# Embed cover image into pre-generated audio files without running TTS:
python cli.py generation_progress.json \
--cover-image /path/to/cover.jpg \
--embed-cover-only
# Force re-processing all chapters from scratch:
python cli.py generation_progress.json --force-reprocess
| Flag | Description |
|---|---|
config_json | Path to generation_progress.json (exported by the UI). Optional when --book is given. |
--book | Generate straight from a book file (EPUB, PDF, TXT, DOCX, ODT, MOBI). |
--book-path | Book file to use with a JSON (for the cover, or when the JSON has no chapter text). |
--chapters | Only run these chapter numbers, e.g. 1-12 or 1,3,5. |
--redo | Regenerate these chapters even if they are finished. |
--provider / --tts-model-name / --tts-option KEY=VALUE | Engine, model and engine-specific options (see --list-providers). |
--language | Language of the text, e.g. English, Hindi. |
--voice-file | Narrator reference clip to clone. |
--voice-transcript / --voice-transcript-file | What is said in the reference clip, as text or as a file. |
--voice-preset | Saved voice preset of the engine, used instead of a clip. |
--single-file | Combine all chapters into one file with chapter markers. |
--speed, --pause, --para-pause, --max-len | Narration pacing and chunk length. |
--verify | Check each chunk: off, duration (default) or asr (Whisper transcript). |
--gpu-count, --batch-size | GPUs to use and chunks per batch (0 = automatic). |
--parallel-mode | chunks (all GPUs share one chapter, default), chapters (one chapter per GPU) or auto (short chapters one per GPU, long ones shared). |
--dry-run / --list-providers | Print the resolved configuration / the available engines, then exit. |
--local | Run in this process even when the API server is up. |
--output-dir | Override destination output directory. |
--output-format | Override audio output format (mp3, flac, wav, m4b). |
--worker-count | Override parallel worker count. |
--device | Select compute device (cuda or cpu). |
--quantization | Model quantization mode (none or int8). |
--cover-image | Supply or override cover image file (.jpg, .png, .webp). |
--embed-cover-only | Instantly embed cover art into existing output audio without TTS. |
--no-resume-chunks | Disable chunk-level disk cache resume and re-synthesize all chunks. |
--force-reprocess | Force re-extraction and re-synthesis of all chapters. |
generation_progress.json containing all settings and embedded chapter text.python cli.py generation_progress.json in your terminal or cloud notebook.You can run AudiobookMaker entirely in cloud notebooks β no local GPU or installation required.
notebooks/AudiobookMaker_Colab.ipynb in Google Colab.!python scripts/colab_prerun_check.py
gradio.live link.notebooks/AudiobookMaker_Kaggle.ipynb in Kaggle.!python scripts/kaggle_prerun_check.py
Verifies both T4 GPUs, VRAM metrics, PyO3 bindings, and multi-GPU pool dispatch in <5 seconds.| Feature / Behavior | Detail |
|---|---|
| Multi-GPU Parallelism | Kaggle T4x2 assigns one model instance per GPU. Long chapters gain about 1.6Γ from the second GPU; for books with short chapters choose Parallelism auto. |
| Other engines | Each optional engine needs its own transformers version, so install one per session (the notebooks have a cell for it). |
| Flash Attention | T4 GPUs don't have flash_attn pre-installed. The app auto-detects this and uses PyTorch SDPA β generation still works flawlessly. |
| Rust Acceleration | Pre-run check compiles audiobook_rust via maturin. If compilation fails, pure-Python fallbacks activate automatically. |
| Chunk-Level Resume | Progress and chunk audio (.temp_chunks/) are cached to disk so you can resume interrupted cloud sessions without losing progress. |
.epub, .mobi, .pdf, .docx, .odt, .txt)1-50, 51-120, 121-250. Each range becomes a separate chapter file.Tip: Your chapter selection is automatically saved to
generation_progress.jsonwhen generation starts. Upload that file later to restore your exact chapter picks without re-selecting.
Upload your raw voice WAV and run any combination of these steps:
| Step | What it does |
|---|---|
| Noise Reduction | Reduces background hiss/hum |
| Noise Gate | Silences frames below a dB threshold |
| High-Pass Filter | Removes low-frequency rumble |
| Silence Removal | Strips long silences between words |
| Normalize Volume | Peaks at your chosen dBFS |
| Formant Shift | Adjust voice gender/timbre (experimental) |
| Resample | Convert to 22k / 44.1k / 48k Hz |
Click βΆ Preview Processed Audio to hear the result, then πΎ Use as narrator voice to pass it to the next tab.
[English] ryan, [Japanese] ono_anna) for the best quality match.min(gpu_count * 4, 8) based on detected GPUs. Thanks to our Multi-GPU Pool architecture (GPUPoolManager), workers dynamically stream work across all available GPUs in parallel with optimal VRAM management.chunks: every GPU shares one chapter (default). chapters: one chapter per GPU. auto: short chapters one per GPU, long ones shared..txt chapter text, .lrc timed lyrics, .srt subtitles, and .vtt WebVTT subtitles alongside audio..txt with one fix per line in search==replace format (regex supported). Comments start with #.
# Fix common TTS mispronunciations
Barbadoes==Barbayduss
N\.E\.==north east
Dr\.==Doctor
generation_progress.json to resume a previous session. All settings (voice, model, format, chapter selection) are automatically restored to the UI.completed in the progress JSON but the audio file is missing on disk, it will be automatically re-generated.Edit audiobook_factory/tts_providers/qwen_provider.py:
# In _load_base_model():
"Qwen/Qwen3-TTS-12Hz-1.7B-Base" # replace with any compatible Qwen3 checkpoint
# In _run_genesis():
"Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign" # design model used once for voice genesis
audiobook_factory/tts_providers/my_provider.pyBaseTTSProvider and implement synthesize(), estimate_cost(), get_name()base_tts_provider.get_tts_provider()tts_provider_dd dropdown in app.pyEdit audiobook_factory/extractor_engine.py:
TextNormalizer._strip_noise() β add/remove markdown patterns to cleanTextNormalizer._fix_isolated_capitals() β font-kerning fixes (e.g. T HE β THE)_SKIP_TOC_TITLE regex β controls which TOC entries are excluded (copyright, gallery, etc.)MLClassifier.predict_is_chapter() β swap in a trained XGBoost model here when readyEdit audiobook_factory/pipeline.py:
lufs: int = -18 # loudness target
true_peak: float = -1.5 # max true peak dBTP
Or adjust these in the UI (LUFS slider in Book tab, True Peak in Advanced tab).
When a chapter cannot reach the loudness target under the true-peak ceiling with gain alone, the peaks in the way are turned down by a look-ahead limiter (audiobook_factory/loudness.py, mirrored in audiobook_rust/src/audio/master.rs).
Edit audiobook_factory/ffmpeg_utils.py β add a new entry to get_format_settings().
Edit audiobook_factory/voice_preprocessor.py:
PreprocessConfig dataclass controls all defaults| Format | Chapter Detection | Fallback |
|---|---|---|
| EPUB | β TOC chapter list | β |
| MOBI | β Try TOC | Page-range picker |
| β | Page-range picker | |
| DOCX | β | Page-range picker |
| ODT | β | Page-range picker |
| TXT | β | Whole book |
| Format | Notes |
|---|---|
| MP3 | Default, most compatible |
| FLAC | Lossless |
| WAV | Uncompressed |
| M4B | Audiobook format with chapter markers (Apple Books) |
Audiobookshelf is a self-hosted audiobook library server. AudiobookMaker generates output that Audiobookshelf automatically detects:
Output filenames follow the {NNNN}_{Chapter_Title}.mp3 format Audiobookshelf expects.
Modern versions of Gradio implement sandbox security checks that restrict browsers from loading server-generated files directly. To ensure seamless operation, AudiobookMaker automatically whitelists the project root directory using allowed_paths=[_ROOT] inside app.py. This enables:
auto mode that hands short chapters out one per GPU.--book), the API lists engines and serves result files, and the repository layout was tidied (notebooks/, scripts/).See CHANGELOG.md for the full list.
pipeline.py, progress_io.py): Automatic chapter retries (max_chapter_retries: int = 2) with CUDA cache clearing (torch.cuda.empty_cache() and gc.collect()), exponential backoff delay, retry persistence (update_chapter_retry), and end-of-run retry pass (retry_failed_at_end).bezzam/VibeVoice-1.5B-hf) and F5-TTS (SWAVE-LAB/F5-TTS) zero-shot voice cloning alongside Qwen3-TTS.vram_headroom_gb: float = 2.0) to calculate safe batch sizes on lower-memory GPUs (e.g. 8 GB cards). Low-VRAM preflight warnings (<= 8.5 GB)._MINIMUM_CHAPTER_WAV_BYTES = 10_000) and outputs a top-level generation_summary block (completed/failed counts, failed chapter numbers, ISO timestamp) to generation_progress.json upon run completion.{"type": "ping"}) and dedicated session_end WebSocket events for cloud proxy reliability (Kaggle/Colab).@app.on_event("shutdown") in FastAPI server to flag task cancellation, flush checkpoints, and shut down GPUPoolManager. Isolated worker task execution in _run_task_safely().preflight.py): run_preflight_checks() validates Python, PyTorch, CUDA count, bfloat16 hardware support, transformers API, soundfile, FFmpeg, voice reference, and Python 3.12 dict view picklability in under 30 seconds before model loading.BaseTTSProvider._validate_voice_ref() boundary validation and SHA-256 hash caching (_VOICE_REF_CACHE) in _resolve_voice_ref() to prevent redundant temp file writes on disk._validate_chunk_file() (minimum size guard = 1,000 bytes). Missing or corrupted chunk files on disk are automatically detected, reported with a stale checkpoint warning, and re-synthesized._sanitize_dict_keys() to cover dict_keys, dict_values, and dict_items view objects across model and generation configs.chapter_pipeline.py, featuring CPU text preparation (Stage A), parallel GPU batch synthesis workers (Stage B), and streaming partial mastering with async disk I/O (Stage C)..temp_chunks/ during generation. Interrupted runs seamlessly pick up from the exact sentence without re-synthesizing completed chunks.audiobook_rust)notebooks/AudiobookMaker_Kaggle.ipynb): Native Kaggle setup supporting GPU T4x2 dual-GPU parallel execution.scripts/colab_prerun_check.py and scripts/kaggle_prerun_check.py to test hardware, PyO3 bindings, and GPU pool dispatch in under 5 seconds before loading model weights.--embed-cover-only flag allows instant injection of cover art and ID3 metadata into existing audio files without triggering model load.--quantization int8 flag via bitsandbytes, cutting model VRAM usage by ~50%..srt subtitle and .vtt WebVTT export alongside .lrc timed lyrics for maximum compatibility across media players and Audiobookshelf.GPUPoolManager and ProviderPool (audiobook_factory/gpu_pool.py), which automatically detects all CUDA devices (e.g. dual Tesla T4s on Kaggle) and loads dedicated model instances per GPU.api/worker.py background consumer loop to run tasks concurrently up to the number of detected GPUs (asyncio.Semaphore).GPU: cuda:0 + cuda:1 (2Γ parallel)), and the Advanced tab worker slider automatically defaults to min(gpu_count * 4, 8).GET /api/v1/health now returns detailed multi-GPU pool status and free/total VRAM metrics per device.generation_progress.json. When you upload a progress file to resume generation, the chapter checkbox list is automatically restored to the exact same selection β no need to manually re-select chapters each time.completed but its audio file is missing on disk.flash_attn to be pre-installed. It detects availability at runtime and gracefully falls back to PyTorch SDPA β preventing crashes on T4 GPUs in Colab/Kaggle and other environments.punkt_tab auto-download: NLTK 3.9+ requires a new punkt_tab resource for sentence tokenization. AudiobookMaker now automatically checks for and downloads both punkt and punkt_tab on startup, preventing pipeline crashes on fresh environments.CancelToken attribute fix: Resolved an AttributeError in the API worker that caused the cancellation flow to crash ('CancelToken' object has no attribute 'cancelled' β fixed to use .is_cancelled).hasattr() guards around all Rust extension calls (clean_text, normalize_text, split_sentences, master_audio). The pipeline continues with pure-Python implementations if the Rust module was compiled without certain functions.This project would not have been possible without the incredible work from these projects:
The voice cloning and TTS engine powering high-quality audio generation. State-of-the-art text-to-speech with zero-shot voice cloning from a short reference clip.
Optional TTS engines; each is used under its own licence (see TTS engines).
Fast, lightweight zero-shot text-to-speech voice cloning model integrated as a provider option in AudiobookMaker.
The voice preprocessing pipeline in this project (noise reduction, noise gate, high-pass filter, silence removal, formant shifting) is directly inspired by the preprocessing architecture used in Mangio-RVC-Fork.
AGPL-3.0-or-later β see LICENSE and NOTICE.
NOTICE grants an additional permission to combine AudiobookMaker with them.