{"slug": "how-to-convert-an-epub-to-an-m4b-audiobook-in-a-cloned-voice-no-gpu-open-source", "title": "How to Convert an EPUB to an M4B Audiobook in a Cloned Voice (No GPU, Open Source)", "summary": "An open-source command-line tool, miragea-audiobook, converts EPUB, Markdown and plain-text files into a single chaptered .m4b audiobook narrated through the Miragea API in a voice cloned from a short sample, without requiring a GPU or local model weights. The tool splits text into whole-sentence chunks of about 900 characters, voices them in parallel and caches results by request hash so interrupted runs resume without re-billing, and it emits chapter markers, a .cue sheet, a chapters list, a JSON manifest and per-chapter MP3s. The developer reports running chapter 1 back through speech recognition and finding it matched the source text word for word.", "body_md": "If you have searched for \"EPUB to audiobook\" you have probably met tools that want PyTorch, a few gigabytes of model weights and a GPU. This tutorial does the same job from a plain command line: **miragea-audiobook** reads an EPUB, Markdown or text file, narrates it through the Miragea API in a voice cloned from a short sample, and gives you one chaptered `.m4b`.\n\n`brew install ffmpeg` or `apt install ffmpeg`)\n\n```\npipx install miragea-audiobook\nexport MIRAGEA_API_KEY=...\nmiragea-audiobook chapters book.epub\nmiragea-audiobook plan book.epub\n```\n\nEPUB chapters come from the spine and each file's first heading. Covers and copyright stubs under 20 words are skipped. For Markdown, each `##` heading is a chapter; for plain text, lines starting with \"Chapter\", \"Part\", \"Prologue\" and similar.\n\n```\nmiragea-audiobook make book.epub \\\n  --voice 'https://example.com/my-voice.wav|Exact words spoken in that sample.' --split\n```\n\nThe text is cut into whole-sentence chunks (900 characters by default), voiced in parallel, and cached by request hash. If something fails halfway, run the same command again: finished chunks are reused and not billed twice.\n\n`the-salt-road.m4b` with chapter markers, a `.cue` sheet, a `.chapters.txt` list ready for YouTube descriptions, a JSON manifest and one MP3 per chapter. Here is the real waveform of the demo book, with the markers at the chapter starts:\n\nListen to the real demo: [https://codeberg.org/miragea-voice/miragea-audiobook/raw/branch/main/examples/demo/the-salt-road.m4b](https://codeberg.org/miragea-voice/miragea-audiobook/raw/branch/main/examples/demo/the-salt-road.m4b)\n\nI ran chapter 1 back through speech recognition and it matched the source text word for word.\n\n`--preview` first on a big book: it builds the whole file offline with placeholder tones so you can check chapters and timing for free.`--chapters 1-3` voices just a few chapters while you audition a voice.\nSource (MIT): [https://codeberg.org/miragea-voice/miragea-audiobook](https://codeberg.org/miragea-voice/miragea-audiobook). Package: [https://pypi.org/project/miragea-audiobook/](https://pypi.org/project/miragea-audiobook/)", "url": "https://wpnews.pro/news/how-to-convert-an-epub-to-an-m4b-audiobook-in-a-cloned-voice-no-gpu-open-source", "canonical_source": "https://dev.to/miragea-voice/how-to-convert-an-epub-to-an-m4b-audiobook-in-a-cloned-voice-no-gpu-open-source-25pk", "published_at": "2026-11-13 02:06:38+00:00", "updated_at": "2026-11-13 02:19:47.322830+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "developer-tools"], "entities": ["miragea-audiobook", "Miragea API", "Codeberg", "PyPI", "ffmpeg"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-to-convert-an-epub-to-an-m4b-audiobook-in-a-cloned-voice-no-gpu-open-source", "markdown": "https://wpnews.pro/news/how-to-convert-an-epub-to-an-m4b-audiobook-in-a-cloned-voice-no-gpu-open-source.md", "text": "https://wpnews.pro/news/how-to-convert-an-epub-to-an-m4b-audiobook-in-a-cloned-voice-no-gpu-open-source.txt", "jsonld": "https://wpnews.pro/news/how-to-convert-an-epub-to-an-m4b-audiobook-in-a-cloned-voice-no-gpu-open-source.jsonld"}}