edge-tts is a Python module that allows you to use Microsoft Edge's online text-to-speech service from within your Python code or using the provided e

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2025-01-23 03:30:04

edge-tts is a Python module that allows you to use Microsoft Edge's online text-to-speech service from within your Python code or using the provided edge-tts or edge-playback command.

All edge-tts commands work with edge-playback with the exception of the --write-media, --write-subtitles and --list-voices options.

You can change the voice used by the text-to-speech service by using the --voice option. The --list-voices option can be used to list all available voices.

Support for custom SSML was removed because Microsoft prevents the use of any SSML that could not be generated by Microsoft Edge itself. This means that all the cases where custom SSML would be useful cannot be supported as the service only permits a single <voice> tag with a single <prosody> tag inside it. Any available customization options that could be used in the <prosody> tag are already available from the library or the command line itself.

You can change the rate, volume and pitch of the generated speech by using the --rate, --volume and --pitch options. When using a negative value, you will need to use --[option]=-50% instead of --[option] -50% to avoid the option being interpreted as a command line option.

Leave a Comment