edge-tts
Microsoft Edge's TTS
What it is and what it does
edge-tts wraps Microsoft Edge's online text-to-speech service, letting you generate speech audio and synchronized subtitles from text in your Python code or via command-line commands. It supports multiple voices across many languages, with control over speech rate, volume, and pitch. The package works asynchronously and depends on aiohttp for HTTP communication with the Edge service.
You can use it either as a standalone tool via edge-tts and edge-playback commands or import it as a Python module for programmatic access. The service requires no API key but depends on Microsoft's online service being available. Custom SSML is not supported due to Microsoft's restrictions on what the service will accept.
Use it for:
- Generate MP3 audio files with synchronized SRT subtitles from text for video production or accessibility
- Build a command-line tool that reads text aloud with voice selection and playback
- Add speech synthesis to a Python application without managing local TTS models
- Create multilingual audio samples by iterating over available voices and text in different languages
- Automate podcast or audiobook generation from written content with subtitle support
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts text to speech using Microsoft Edge's online TTS service, available as both a Python module and command-line tools for generating audio files and subtitles.
Yes, if you need free, zero-setup text-to-speech without local model management. The package is actively maintained, has no known vulnerabilities, and low install friction. The LGPLv3 copyleft license is permissive for most use cases. Main trade-off: you depend on Microsoft's online service availability; not suitable for offline-only or privacy-critical applications.
Install
edge-tts on PyPI
pip
pip install edge-ttsuv
uv add edge-ttspoetry
poetry add edge-ttsInstalling edge-tts
Before you install
Low friction installation with a pure Python wheel. Actively maintained with recent commits and substantial community adoption (11725 stars). Requires only four runtime dependencies (aiohttp, certifi, tabulate, typing-extensions).
License in practice
Licensed under LGPLv3 (copyleft). You may use and modify the package freely, but any derivative works must also be distributed under LGPLv3 and include source code availability.
Quickstart
pip install edge-tts
edge-tts --text "Hello, world!" --write-media hello.mp3 --write-subtitles hello.srt
# Or in Python:
import asyncio
from edge_tts import Communicate
async def main():
communicate = Communicate("Hello, world!", "en-US")
await communicate.save("hello.mp3")
asyncio.run(main())
edge-playback command requires mpv player installed (except on Windows). Requires Python 3.7 or later.
Verify before relying
- Whether the package handles network failures gracefully or requires manual retry logic
- Rate limiting or quota constraints from Microsoft's service
- Audio quality or latency characteristics compared to other TTS providers
- Offline fallback options or local model support
Package facts
| License | not declared (copyleft) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — aiohttp, certifi, tabulate, typing-extensions |
| Maintenance | actively maintained — 145 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,002,561/month — #1,299 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: edge_tts-7.2.8-py3-none-any.whl
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
pyttsx3pyttsx3 converts text to speech offline using…
copyleft · top 5,000 on PyPI
gTTSgTTS converts text to speech using Google…
permissive · top 5,000 on PyPI
omnivoiceOmniVoice generates speech from text in over…
permissive · top 15,000 on PyPI
pocket-ttsPocket TTS generates speech from text on CPU…
unclear · top 15,000 on PyPI
TTSTTS is a deep learning library for…
copyleft · top 15,000 on PyPI
mlx-audioMLX-Audio provides text-to-speech,…
permissive · top 15,000 on PyPI
chatterbox-ttsChatterbox TTS converts text to speech using…
permissive · top 15,000 on PyPI
coqui-ttsCoqui TTS synthesizes speech from text using…
copyleft · top 15,000 on PyPI
piper-ttsPiper TTS is a local neural text-to-speech…
copyleft · top 5,000 on PyPI
livekit-plugins-sonioxIntegrates Soniox speech-to-text and…
permissive · top 15,000 on PyPI