edge-tts is a Python module that lets you access Microsoft Edge’s text-to-speech service. The installation process is simple, and you can change the voice used for speech. You can also adjust speech rate, volume, and pitch. Custom SSML support was removed due to Microsoft restrictions. The module can be used directly from Python, with examples provided. Surprisingly, the edge-tts command allows for immediate playback with subtitles. Other projects utilizing edge-tts include hass-edge-tts and Podcastfy. Note that edge-playback requires mpv installation. Overall, this module provides versatile options for generating speech easily in Python.
https://github.com/rany2/edge-tts