█

AI/TLDR

Buy me a coffee
Buy me a coffee

Alexandria

A local web app that turns a book into a multi-voice audiobook: an LLM annotates the text into speaker-tagged lines, and a built-in Qwen3-TTS engine voices each character

Audio, Music & VoiceOpen source
Latest
v1.5
Updated
3 Mar 2026
Language
Python
License
MIT

What's new

v1.53 Mar 2026

Adds chaptered M4B export with metadata and cover art, reference-audio upload for voice cloning in the Voices tab, and fixes for cancelling generation and batch rendering slowdowns.

IN SHORT

What is Alexandria?

Alexandria is an open-source audiobook generator that runs on your own machine as a browser-based app. It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in Python and licensed MIT. To get started: start an LLM server.

Updated Markdown version ↗

Overview

Alexandria is an open-source audiobook generator that runs on your own machine as a browser-based app. You upload a book or novel as a .txt, .md or .epub file, and an LLM of your choice rewrites it into an annotated script: a JSON list of lines, each with a speaker (NARRATOR or a character name), the text to speak, and an `instruct` field describing how it should be delivered, such as "Skeptical, dry." or "Calm, even narration."

Alexandria's Audio Editor tab: a table of script lines with columns for speaker (NARRATOR, SION, BRIN, RHUN), text, an instruct direction such as "Skeptical, dry.", a pending status and a Gen button, under toolbar buttons Play Sequence, Render Pending, Batch (Fast), Regenerate All and Merge All.
The editor shows every line of the annotated script with its speaker and delivery direction; each line can be edited and rendered on its own before the whole book is merged.Alexandria README ↗

The voices come from a built-in Qwen3-TTS engine that loads its models directly, so no separate TTS server is needed. Each character can use one of nine preset voices with a style hint, a clone made from a 5–15 second reference clip, a voice designed from a text description, or a LoRA adapter trained on your own voice dataset. A Generate Personas button lets the LLM write a voice description for every character and assign clone voices in one go.

The interface follows five steps (Setup, Script, Voices, Editor, Result), plus advanced tabs for the voice designer, dataset builder and LoRA training. In the editor you can change any line's speaker, text or instruct, re-render just that line, batch-render the rest, and merge everything into a single MP3. Exports also include per-line MP3s, a chaptered M4B for audiobook players, and a zip of per-speaker WAV tracks that opens as a multi-track project in Audacity. Alexandria does not ship an LLM: it talks to any OpenAI-compatible API, including LM Studio, Ollama or OpenAI.

What it does

  • LLM script annotation that splits a book into speaker-tagged lines with per-line delivery directions, plus an optional second LLM pass that fixes misattributed dialogue and narration
Alexandria's Voice Configuration tab listing the characters BRIN, NARRATOR, RHUN and SION, each with a choice of Custom Voice or Voice Clone, a preset voice dropdown such as Eric, Vivian or Ryan, and a default style field.
Every character found in the script gets its own voice card.Alexandria README ↗
  • Four voice types per character: nine preset Qwen3-TTS voices with style instructions, voice cloning from a short reference clip, voices designed from a text description, and trained LoRA voice adapters (with built-in LoRA presets)
  • Persona generation and speaker aliases, so the LLM can cast every character automatically and name variants like "YOUNG ELENA" share one voice
  • A line-by-line editor with selective regeneration, playback of single lines or the whole sequence, and batch rendering that can use an optional `torch.compile` codec step for faster decoding
  • Export to a combined MP3, individual voiceline MP3s, a chaptered M4B with auto-detected chapters, or an Audacity zip with one WAV track per speaker
  • A REST API on the same server (upload, script generation, voice config, batch render, merge, download) for scripting the pipeline from Python or JavaScript

Getting started

The README recommends installing through Pinokio (click Download, paste the repo URL, then Install and Start); a Google Colab notebook and a Docker setup for NVIDIA GPUs are also provided. The project lists 8 GB of VRAM as the minimum and 16 GB or more as recommended; CPU mode works on every platform but is much slower. The steps below use Docker.

Start an LLM server

Alexandria connects to an LLM over an OpenAI-compatible API and does not include one. LM Studio (`http://localhost:1234/v1`), Ollama (`http://localhost:11434/v1`) or the OpenAI API all work. With Ollama:

bashbash
ollama run qwen3

Clone and launch with Docker

Requires Docker with the NVIDIA Container Toolkit. The web UI is served at `http://localhost:4200`. The TTS model weights (about 3.5 GB per model variant) download from Hugging Face the first time you generate audio.

bashbash
git clone https://github.com/Finrandojin/alexandria-audiobook.git
cd alexandria-audiobook
docker compose up --build

Configure the Setup tab

Enter the LLM Base URL, an API key (`local` for local servers) and the model name, leave TTS Mode on `local` for the built-in engine, and click Save Configuration.

Upload a book and generate the script

On the Script tab, pick a .txt, .md or .epub file and click Generate Annotated Script. If speakers are mixed up, Review Script runs a second LLM pass to fix them.

Alexandria's Upload and Generate Script tab with a book file selected, a Generate Annotated Script button, a list of saved scripts, and a generation log showing the book split into 24 chunks of up to 12,000 characters for the LLM.
Uploading a book and generating the annotated script; the log shows the text being split into chunks and sent to the configured LLM.Alexandria README ↗

Assign voices

On the Voices tab, choose Custom Voice, Clone Voice, LoRA Voice or Voice Design for each character, or click Generate Personas to let the LLM cast them all. Changes save automatically.

Render, merge and export

In the Editor, click Render Pending to generate every line, tweak and regenerate individual lines as needed, then click Merge All. The Result tab plays the audiobook and offers MP3 download or Export to Audacity.

Alexandria's Final Result tab with an audio player for the finished audiobook, Download MP3 and Export to Audacity buttons, and a log reading "Merge complete: cloned_audiobook.mp3".
The Result tab plays the merged audiobook and offers MP3 download or an Audacity export.Alexandria README ↗

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when you want to turn a public-domain novel or your own manuscript into an audiobook where each character has a distinct voice
  • Reach for it when you want to keep the whole pipeline local, pairing a local LLM in LM Studio or Ollama with on-device text-to-speech
  • Reach for it when you need line-level control over delivery, fixing a single misread line instead of regenerating the whole book
  • Reach for it when the output will be finished in a DAW, using per-speaker WAV tracks in Audacity or a chaptered M4B for audiobook players

How Alexandria compares

Alexandria alongside other open-source audio, music & voice tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
VoiceStudio★ 121kA local-first desktop voice studio that clones and designs voices, dubs video, and handles dictation, running 16 text-to-speech and 11 speech-recognition engines on your own hardware.
Whisper★ 114kOpenAI's speech recognition model that transcribes and translates audio across many languages.
GPT-SoVITS★ 64.3kAn open-source WebUI that clones a voice from a short audio sample and turns text into speech, with zero-shot and few-shot fine-tuning.
Voicebox★ 61.6kLocal-first voice studio that clones a voice from a short sample, generates speech across seven TTS engines and 23 languages, handles system-wide dictation, and speaks for agents over MCP.
VibeVoice★ 57.6kMicrosoft's text-to-speech model for generating long, expressive multi-speaker audio like podcasts.
whisper.cpp★ 55.7kA dependency-free C/C++ port of Whisper built on ggml, running speech recognition on CPU, Metal, CUDA, Vulkan and NPUs from phones to servers.
Coqui TTS★ 46.3kA library of text-to-speech models including the multilingual XTTS voice-cloning model.
Alexandria★ 1.1kA local web app that turns a book into a multi-voice audiobook: an LLM annotates the text into speaker-tagged lines, and a built-in Qwen3-TTS engine voices each character