Skip to main content

edge-tts

edge-tts lets you use Microsoft Edge's online text-to-speech service from Python, or from the command line with the edge-tts and edge-playback commands.

Installation

$ uv add edge-tts          # or: pip install edge-tts

To use only the commands, install them as a tool, or run them without installing:

$ uv tool install edge-tts
$ uvx edge-tts --text "Hello, world!" --write-media hello.mp3

Command line

$ edge-tts --text "Hello, world!" --write-media hello.mp3 --write-subtitles hello.srt

To play the speech back immediately, use edge-playback, which takes the same options except --write-media, --write-subtitles and --list-voices. It requires mpv, except on Windows.

$ edge-playback --text "Hello, world!"

List the available voices with --list-voices, and pick one with --voice:

$ edge-tts --voice ar-EG-SalmaNeural --text "مرحبا كيف حالك؟" --write-media hello.mp3

Adjust the speech with --rate, --volume and --pitch. Write negative values with =, so they aren't read as options:

$ edge-tts --rate=-50% --pitch=-5Hz --text "Hello, world!" --write-media hello.mp3

Run edge-tts --help for all options. Custom SSML isn't supported, because the service only accepts the SSML that Microsoft Edge itself generates.

Python

import edge_tts

edge_tts.Communicate("Hello, world!", "en-GB-SoniaNeural").save_sync("hello.mp3")

See examples/ for async usage, streaming, subtitles and voice selection.

Troubleshooting

See TROUBLESHOOTING.md for common errors, such as NoAudioReceived, and how to deal with them.

Development

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

Releases are published to PyPI automatically when a GitHub release is created.

Metadata

Release files for edge-tts 7.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edge-tts 7.4.1
File Size Uploaded Provenance Actions
edge_tts-7.4.1.tar.gz 54.8 kB With provenance Details for edge_tts-7.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for edge-tts 7.4.1
File Interpreter ABI Platform Actions
edge_tts-7.4.1-py3-none-any.whl Python 3 none any Details for edge_tts-7.4.1-py3-none-any.whl

Total release size: 106.0 kB

Release files / edge_tts-7.4.1.tar.gz

Download URL edge_tts-7.4.1.tar.gz
Size 54.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1dcd5ae21c56ece759e1f846d7bbd56054fc61c4660b88dd7748e7f61b040133
BLAKE2b-256 checksum
How to use checksums
19b14ff92ee9d3a87dac5b21ba9aa1c5c49fbbbd5aec5c0058a6b81c98ca228d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / edge_tts-7.4.1-py3-none-any.whl

Download URL edge_tts-7.4.1-py3-none-any.whl
Size 51.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b1a4a7c4ad7e23ae29d685dd67c61c00bd27a904c388fe58c60413fd48a79f8
BLAKE2b-256 checksum
How to use checksums
67786694c82f7920e3850d03c2c9c4b46086b5c235df7d4eaf53ee2118c4b341
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for edge-tts 7.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for edge_tts-7.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

7.4.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page