AudioBookConvert v2
A light-weight, powerful, and cinematic single-page application for converting massive text documents into rich, natural audiobooks locally in your browser.
Solves the "fake sounding" robot voices by hijacking the state-of-the-art Azure neural models.
npm install
npm run devWorks on Mac, Windows, and Linux entirely inside your browser.
"If you want to read a 500-page PDF on your commute, this WILL build the audiobook for you. No bs."
"I've used countless subscription services for TTS — this produces the same quality audio for completely free."
Why I Built This · How It Works · Features · Getting Started
I'm an avid reader who wanted to consume long articles, textbooks, and documents while commuting or working out. Standard text-to-speech tools sound generic and robotic, and the truly natural-sounding "premium" AI voices are locked behind expensive SaaS subscriptions that charge by the character.
I realized I didn't need to pay an AI wrapper company. I just needed to access the foundational models directly.
So I built AudioBookConvert. The complexity is in the background: managing WebSocket dropouts, slicing huge documents into parallel chunks, processing audio buffers in real-time, and merging MP3s entirely inside the browser's memory. What you see: a beautiful, distraction-free interface that just converts your documents.
Microsoft Edge (the web browser) has a built-in "Read Aloud" accessibility feature that sounds incredibly natural. To make this work, Microsoft built a hidden API endpoint (wss://speech.platform.bing.com) that connects the browser directly to their massive Azure cloud data centers, where they run state-of-the-art Neural Text-to-Speech (TTS) AI models.
I figured out how to "impersonate" the Microsoft Edge browser to access this API for free—which is exactly what the edgeTtsService.ts file is doing.
By routing everything directly from your browser to the Azure servers, AudioBookConvert doesn't require any backend server, API keys, or subscription fees. It's just you, your browser, and Microsoft's enterprise AI hardware.
People who want to convert long-form text (documents, articles, textbooks, PDFs) into high-fidelity audiobooks seamlessly — without paying per-character data limits or dealing with robotic voices.
Your document is instantly sliced into optimized blocks and distributed across up to 15 concurrent web workers. Why wait hours to convert a book? The parallel pipeline dramatically reduces generation time.
Vibecoding has a bad reputation. You describe what you want, AI generates code, and you get inconsistent garbage that falls apart at scale. Not here. V2 ships with:
- Cinematic Reactive UI: Floating, glassmorphic blobs that react as you switch conversion states.
- Dedicated Conversion Dashboards: A focused execution screen that hides unnecessary configurations while generating.
- Fail-safe Error Screens: Clear failure guidance preventing silent timeouts.
The entire pipeline runs in your browser. Audio streams are captured from the WebSocket, processed using lamejs, assembled in-memory as massive binary buffers, and ultimately downloaded directly to your hard drive. Zero backend databases. Your data never touches our servers.
Because everything is configured for the client side, installation takes roughly ten seconds.
# Clone the repository
git clone https://github.com/yourusername/AudioBookConvert.git
# Move into Directory
cd AudioBookConvert
# Install Dependencies
npm install
# Run the Development Server
npm run devNavigate to http://localhost:5173 to start converting!
The UI has safeguards in place to prevent the Microsoft servers from closing the connection during heavy loads, but you can tune your pipeline in step 2:
| Toggle / Option | Best For | Description |
|---|---|---|
| Chunk Size | 4,000 - 8,000 | The max length of text sent per payload. High counts require massive RAM. Keep around 5000 chars for optimal stability. |
| Parallel Workers | 5 - 12 | The number of simultaneous TTS threads. Highly dependent on your CPU threading and network bandwidth. |
| Pacing / Pitch | Tuning | Real-time preview of exactly how the voice acts before converting. |
- Normalize Audio (WIP): Hard limits peaks to create standard podcast-level volume output.
- Remove Pauses (WIP): Aggressively truncates silent blocks over
500ms. - Stream to Disk: Automatically offloads massive 2GB+ audio buffers directly to local storage to prevent browser memory exhaustion.
| File/Layer | What it does |
|---|---|
edgeTtsService.ts |
The core engine. Establishes the wss connection to Bing's Speech API. |
convertToAudio.ts |
The orchestrator. Text chunking, Web Worker pools, and promise arrays. |
mp3Renderer.ts |
The encoder. Uses lamejs to combine standard audio buffers into proper MP3 files. |
useWorkflowState.ts |
The brain. Global state management across the React interface. |
MIT License. See LICENSE for details.
Enterprise text-to-speech doesn't have to cost a fortune. Just convert it.