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.
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."

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

- 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:
ollama run qwen3Clone 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.
git clone https://github.com/Finrandojin/alexandria-audiobook.git
cd alexandria-audiobook
docker compose up --buildConfigure 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.

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.

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.
| Tool | Stars | What it does |
|---|---|---|
| VoiceStudio | ★ 121k | A 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 | ★ 114k | OpenAI's speech recognition model that transcribes and translates audio across many languages. |
| GPT-SoVITS | ★ 64.3k | An 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.6k | Local-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.6k | Microsoft's text-to-speech model for generating long, expressive multi-speaker audio like podcasts. |
| whisper.cpp | ★ 55.7k | A 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.3k | A library of text-to-speech models including the multilingual XTTS voice-cloning model. |
| Alexandria | ★ 1.1k | 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 |
