rany2 / edge-tts

Use Microsoft Edge's online text-to-speech service from Python WITHOUT needing Microsoft Edge or Windows or an API key
https://pypi.org/project/edge-tts/
GNU General Public License v3.0
4.24k stars 447 forks source link

To add a stress manually #109

Closed katya-bateeva closed 1 year ago

katya-bateeva commented 1 year ago

Is it possible to add a stress to a word manually? I've looked through the code and it seems that there is no such option in edge-tts. E.g. the text is "I was so content with their content". The word "content" can has different stress depending on the meaning of the word: cOntent or contEnt.

rany2 commented 1 year ago

You can't, Microsoft blocks any custom SSML so this feature cannot be implemented. You might want to try and play around with the text input by spelling content in some different way but you can't do anything beyond that. The service will block the request if you use the stress SSML tag.

katya-bateeva commented 1 year ago

@rany2 , thank you for sharing this information!