Migushthe2nd / MsEdgeTTS

A simple Azure Speech Service module that uses the Microsoft Edge Read Aloud API
https://migushthe2nd.github.io/MsEdgeTTS/
MIT License
285 stars 40 forks source link

Reserved Characters in SSML #12

Closed yacine-bens closed 11 months ago

yacine-bens commented 11 months ago

If the text contains reserved characters (<>&"') it won't work. Using a simple escape function solves the issue: image image

Migushthe2nd commented 11 months ago

Thanks! As mentioned in the README I recommend you use an xml sanitizer/escape library. I see that it would be more logical to include this functionality in this library itself (but not in the 'raw' methods), so I will consider adding this.

yacine-bens commented 11 months ago

Oh you're right! I didn't notice that in the README. Thanks.