edge-tts is a Python library that provides access to Microsoft Edge's online text-to-speech service without requiring Microsoft Edge, Windows, or an API key.
The tool solves the problem of generating speech from text by leveraging Microsoft's cloud-based synthesis engine through the same interface that Edge uses. It works by making requests to Microsoft's text-to-speech service and returning audio files and subtitle data. The library supports multiple languages and voices, with options to adjust speech rate, volume, and pitch. It provides both a Python module for programmatic use and command-line tools for direct invocation.
The tool suits developers who need text-to-speech functionality without managing API credentials or infrastructure. It works well for applications requiring multilingual voice synthesis with fine-grained control over prosody. The command-line interface makes it accessible for scripting and automation, while the Python module allows integration into larger applications. The project includes a playback command that can immediately play generated speech with subtitles when the mpv player is available.
Development activity shows consistent maintenance with regular updates addressing issues and adding features. The project maintains backward compatibility while evolving its capabilities. Documentation is thorough, with examples provided for both command-line and programmatic usage. The maintainer actively responds to user needs, as evidenced by deliberate design decisions such as removing custom SSML support when Microsoft's service restrictions made it impractical.