Your 'local' TTS API that still phones Microsoft
It wraps Microsoft Edge's free online speech service in an OpenAI-compatible API, giving your self-hosted LLM stack a voice without the ElevenLabs bill.

What it does
openai-edge-tts is a lightweight Python server that translates OpenAI-style TTS requests into calls to edge-tts, the unofficial interface to Microsoft Edge’s online speech synthesis. It exposes the familiar /v1/audio/speech endpoint so frontends can generate spoken audio without OpenAI, Azure, or ElevenLabs keys. The server handles voice mapping, format conversion, and playback speed tweaks before returning audio.
The interesting bit
The project pulls a neat bait-and-switch: you self-host the API surface, but the actual voice synthesis is performed by Microsoft’s free online Edge voices. It maps OpenAI personas like alloy and nova to corresponding Microsoft neural voices, and supports SSE streaming so web apps can play audio chunks as they arrive.
Key highlights
- Drop-in
/v1/audio/speechendpoint compatible with OpenAI’s TTS request schema. - Maps OpenAI voices (
alloy,echo,shimmer, etc.) to Microsoft Edge neural TTS equivalents. - Supports multiple output formats (
mp3,opus,aac,flac,wav,pcm) and playback speeds from 0.25× to 4.0×. - Optional SSE streaming mode for real-time web playback.
- Ships as a Docker image with an optional
ffmpeg-enabled tag for format transcoding.
Caveats
- Despite the “local” branding,
edge-ttsrelies on Microsoft’s online speech service, so the host needs outbound internet access to Microsoft—it is not fully offline. - The OpenAI
instructionsparameter for fine-tuning voice characteristics is not supported. - Non-mp3 format conversions require
ffmpeg, which is omitted from the default Docker build.
Verdict
Ideal if you want a zero-cost TTS backend for a self-hosted LLM chat interface and don’t mind routing speech requests through Microsoft’s servers. Skip it if you need guaranteed offline operation or granular voice control beyond speed and preset selection.
Frequently asked
- What is travisvn/openai-edge-tts?
- It wraps Microsoft Edge's free online speech service in an OpenAI-compatible API, giving your self-hosted LLM stack a voice without the ElevenLabs bill.
- Is openai-edge-tts open source?
- Yes — travisvn/openai-edge-tts is open source, released under the GPL-3.0 license.
- What language is openai-edge-tts written in?
- travisvn/openai-edge-tts is primarily written in Python.
- How popular is openai-edge-tts?
- travisvn/openai-edge-tts has 2k stars on GitHub.
- Where can I find openai-edge-tts?
- travisvn/openai-edge-tts is on GitHub at https://github.com/travisvn/openai-edge-tts.