Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 04-26-2026, 04:00 PM   #1
xTaraRose
Indi Dev
xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!xTaraRose rocks like Gibraltar!
 
xTaraRose's Avatar
 
Posts: 2
Karma: 100000
Join Date: Apr 2026
Location: Oregon
Device: Tablet
Windows SAPI Bridge for ElevenLabs — Use ElevenLabs TTS in Calibre & Any SAPI App


Windows SAPI Bridge for ElevenLabs
Seamless ElevenLabs TTS — everywhere Windows speaks.

━━━━━━━━━━━━━━━━━━ Why I built this ━━━━━━━━━━━━━━━━━━

I was tired of trying to find different implementations to integrate ElevenLabs into different apps and always coming up short with nothing straightforward and simple to use. Especially with using Calibre a lot — there was realistically nothing out there.

So I present to you the Windows SAPI Bridge for ElevenLabs.

It works across the board with anything that uses the Windows SAPI, allowing seamless use of the ElevenLabs TTS engine and resulting in a much better listening experience — no per-app setup, no hacks, no workarounds. Install once, use everywhere.

━━━━━━━━━━━━━━━━━━━ What it does ━━━━━━━━━━━━━━━━━━━

Windows TTS is built on the SAPI5 (Speech API) standard. Every voice on your system — including Microsoft's built-in ones — is just a COM object registered in the Windows registry. Any application that uses SAPI for text-to-speech will automatically see and be able to use any registered voice.

This project:
  1. Registers a lightweight Python COM server as a SAPI5 TTS engine
  2. Queries your ElevenLabs account and creates one SAPI voice token per voice
  3. Each voice appears in Windows' voice list as ElevenLabs - [name] — indistinguishable from a built-in voice
  4. When an app speaks, the engine streams raw PCM audio from ElevenLabs directly to SAPI, which plays it through your speakers

Works with any SAPI5-compatible application, including (but not limited to):
  • 📚 E-book readers (e.g. Calibre's Read Aloud)
  • ♿ Screen readers and accessibility tools (e.g. NVDA, Windows Narrator)
  • 🗣️ Dedicated TTS players (e.g. Balabolka, TTSReader)
  • 🏠 Home automation / custom scripts using the Windows Speech SDK
  • 🎮 Games and applications with built-in narration
  • Any other software that exposes a voice selection dropdown powered by Windows TTS

━━━━━━━━━━━━━━━━━━━ Requirements ━━━━━━━━━━━━━━━━━━━
  • Windows 10 / 11 (64-bit)
  • Python 3.8+ (64-bit) — python.org
  • ElevenLabs account (free tier works) — Sign up here
  • Internet connection (audio is streamed in real time)

━━━━━━━━━━━━━━━━━━━ Installation ━━━━━━━━━━━━━━━━━━━

Step 1 — Install Python dependencies
Open a normal (non-admin) Command Prompt and run:
Code:
pip install comtypes requests
Step 2 — Add your ElevenLabs API key
Open config.json and replace YOUR_API_KEY_HERE with your ElevenLabs API key. Keep this file in the same folder as the scripts.

Step 3 — Run the installer as Administrator
Right-click Command Prompt → Run as administrator, then:
Code:
cd C:path	owindows-sapi-bridge-elevenlabs
python install_voices.py
This queries your ElevenLabs account and registers every voice in Windows automatically.

Step 4 — Select a voice in your application
Open any SAPI-compatible app, go to its TTS/voice settings, and all your ElevenLabs voices will appear as ElevenLabs - [name]. Select one and it just works.

Note: The very first sentence takes 1–2 seconds longer while Windows spins up the engine. Subsequent speech streams smoothly.

━━━━━━━━━━━━━━━━━━━ Speed Control ━━━━━━━━━━━━━━━━━━━

A speed setting in config.json lets you set a baseline playback speed (0.5–2.0, default 1.0). If your app has its own rate slider, the bridge honours that too and stacks it on top — or you can disable that and rely solely on your configured speed. All config changes take effect immediately with no reinstall needed.

━━━━━━━━━━━━━━━━━━━ Uninstalling ━━━━━━━━━━━━━━━━━━━
Code:
python uninstall_voices.py
Run as Administrator. Cleanly removes all SAPI registrations from the Windows registry.

━━━━━━━━━━━━━━━━━━━━━ Links ━━━━━━━━━━━━━━━━━━━━━
Made with frustration and determination by xTaraRose

xTaraRose is offline   Reply With Quote
Reply

Tags
calibre, elevenlabs, sapi, tts, windows


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre 8.9: TTS output, and where are TTS files stored? Moonbase59 Viewer 3 08-27-2025 10:40 AM
[GUI Plugin] TTS to MP3: Create MP3 audiobook using Windows TTS jackie_w Plugins 156 03-29-2025 11:11 AM
Error: KeyError language after installing Amazon Polly SAPI rrhpablo Calibre 2 12-28-2022 10:13 PM
Using Windows 8.1 & Kindle app jjl Calibre 3 12-17-2013 04:30 PM
iOS OR Android app: Adobe DRM & TTS support for library books xendula Which one should I buy? 10 01-26-2013 10:17 AM


All times are GMT -4. The time now is 03:17 AM.


MobileRead.com is a privately owned, operated and funded community.