← Back to Leaderboard
Erany2

rany2/edge-tts

Python SDK and CLI for Microsoft Edge's online TTS, with MP3 and SRT output

AI FrameworkQuickstart ↓
Engineering Health (Methodology)
A · 82/100
Maintenance Activity
● Updated 2d ago
Latest Release
7.4.2
Commercial License Check
Custom / Check Repo

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption21/25
Release Cadence20/20
License Clarity6/20
CLIAPI
Total Stars
★ 12,708
24h Growth
+11
7d Growth
+54
Forks
1,215

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

rany2/edge-tts Star History (2021-09-24 - 2026-12-03) ALL-TIME STAR HISTORY (2021-09 – 2026-12) +12.7k in 1896d · avg +7/day 13.4k 6.7k 0 2021-09-24: ★ 12022-01-22: ★ 62022-05-21: ★ 392022-09-17: ★ 922023-01-14: ★ 1532023-05-13: ★ 8402023-09-09: ★ 1,8882024-01-06: ★ 2,4182024-05-04: ★ 3,4842024-08-31: ★ 4,9192024-12-28: ★ 6,4412025-04-26: ★ 7,8682025-08-23: ★ 8,7302025-12-20: ★ 9,4642026-04-18: ★ 10,5062026-08-15: ★ 11,6642026-12-03: ★ 12,708 ★ 12.7k 2021-09 2024-04 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

edge-tts is a Python client for Microsoft Edge's online text-to-speech service, not a synthesis engine. The edge-tts CLI and Python Communicate interface submit text for remote synthesis. The library handles chunked requests and receives audio over WebSocket. Python callers can consume Communicate.stream() asynchronously or use save_sync() to write a file from synchronous code.

The package uses aiohttp 3.x for network I/O and declares certifi, tabulate, and typing-extensions as dependencies. In 7.4.0, code from edge_tts.util and edge_tts.data_classes moved into text, protocol, network, and config. Integrations that imported the removed modules need to update those imports. Voice selection changes the voice used by the remote service; it does not switch synthesis backends.

Key Capabilities & Differentiators

The CLI generates MP3 audio and SRT subtitles in one invocation with --write-media and --write-subtitles. Voice discovery is exposed through --list-voices, and --voice selects a locale-specific voice such as en-GB-SoniaNeural or ar-EG-SalmaNeural. --rate, --volume, and --pitch adjust delivery; pass negative values with an equals sign, such as --pitch=-5Hz, so they are parsed as values rather than flags.

edge-playback is a separate command for immediate listening rather than file export. It excludes the media and subtitle output flags and voice listing, and it requires mpv outside Windows. The SSML boundary is firm: the service accepts only the form generated by Edge, so the client does not support arbitrary caller-supplied markup.

Trade-offs & Limitations

Compared with an offline TTS engine, edge-tts eliminates model installation and local inference hardware, but submitted text leaves the host and synthesis stops when the online service is unreachable. The client also trades control for simplicity: its voice catalog and accepted markup are service constraints, not settings you can change by operating your own copy of the client.

Compared with a contracted speech API, keyless setup simplifies scripting but does not establish quotas, support, or an SLA. Upstream or network failures can still interrupt generation, even with retry handling. Treat licensing as two separate checks: pyproject.toml declares LGPL-3.0-only AND MIT for the package; that declaration does not establish permissions for Microsoft service usage or commercial use of generated audio.

Hardware & Deployment Guide

Install on Python 3.9 or later with pip install edge-tts or uv add edge-tts. For CLI-only use, uv tool install edge-tts installs the commands as a tool, while uvx edge-tts runs the command without a project installation. No Edge browser, API key, or local inference hardware is required. The environment still needs network access to the upstream service and must permit its WebSocket traffic.

Use at least 7.4.2 if your application passes a custom aiohttp connector: it fixes session teardown closing that connector between chunks or retries. Version 7.4.1 detects and retries premature WebSocket closes that previously could surface as a misleading NoAudioReceived error or return truncated audio. Version 7.4.0 raised the Python minimum to 3.9 and removed edge_tts.util and edge_tts.data_classes; check existing imports before upgrading.

Execution: Python SDK and CLI submit text to Microsoft Edge's online synthesis service; no local model is loaded.
Integration: Communicate supports synchronous file output and asynchronous streaming.
Deliverables: --write-media and --write-subtitles produce MP3 audio and SRT subtitles in one CLI invocation.
Voice controls: Discover voices with --list-voices, choose one with --voice, and adjust rate, volume, or pitch without custom SSML.
Stream integrity: 7.4.1 detects and retries premature WebSocket closes that could previously return truncated audio.
Connector lifecycle: 7.4.2 keeps caller-supplied aiohttp connectors open across chunks and retries.
Best For

Developer scripts, narration prototypes, and audio-plus-subtitle workflows that can send text to Microsoft's online service and use its voice catalog.

Skip If

Text must stay on-premises, synthesis must run offline, or the workload requires custom SSML, backend control, or contractual guarantees for throughput and availability.

Reviewed on 2026-12-01 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

CLIAPI
uv sync                            # create the environment from uv.lock
uv run pre-commit install          # lint, format and type-check on every commit
uv run pytest

Comparison vs. Top Voice, Vision & Video Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
edge-tts ★12.7k+54Python—Python SDK and CLI for Microsoft Edge's online TTS, with MP3 and SRT output
Speech18.8k+18PythonApache-2.0PyTorch speech SDK for training, adapting, and running ASR, TTS, and SpeechLM mo
mlx-audio8.4k+32PythonMITMLX inference SDK for local speech and audio pipelines on Apple Silicon
PaddleSpeech12.7k—PythonApache-2.0PaddlePaddle-based SDK for local and streaming speech recognition and synthesis

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/rany2/edge-tts.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

rany2/edge-tts Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about edge-tts

How should I integrate edge-tts into a script or an async application?

Use edge_tts.Communicate(text, voice).save_sync(path) in a synchronous script. In an asyncio application that needs incremental audio, consume Communicate.stream() and handle failures during stream iteration. If you pass a custom aiohttp connector, use 7.4.2 or later for the fix that keeps it open across requests.

Do I need a GPU, and what determines client-side resource use?

The Python process submits text and receives audio; Microsoft performs synthesis remotely. No local model, GPU, CUDA, or VRAM allocation is required for this path. Size the client for concurrent connections, any audio you buffer in memory, and file output. Check network reliability and upstream behavior under your expected load.

Can I use this commercially or self-host it for compliance?

The package manifest declares LGPL-3.0-only AND MIT. Review obligations for the components you modify or distribute, and separately verify Microsoft's current service terms for your workload and use of the generated audio. You can host the Python client in your own environment, but that does not self-host the synthesis engine or keep submitted text on your infrastructure.

When should I choose an offline engine or a contracted speech API instead?

Choose an offline engine if text must stay on your infrastructure or synthesis must work without internet access. Evaluate a contracted speech API if you need documented quotas, support, or service commitments. edge-tts is a better fit when the available Edge voices and MP3/SRT output meet your needs and remote-service dependency is acceptable.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining rany2/edge-tts? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature rany2/edge-tts on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare