skillfed

edge-tts

Microsoft Edge's TTS

edge-tts v7.2.8 13.0M downloads/30d#1,299 on PyPI11,725
Copyleft license Active released

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-tts

uv

uv add edge-tts

poetry

poetry add edge-tts

Installing 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

License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

text to speech pythonmicrosoft edge ttsgenerate audio from texttts command line toolspeech synthesis apimp3 audio generationsubtitle generation
text-to-speechasync-iocli-tool

More Linguistic packages