Migushthe2nd / MsEdgeTTS

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

Reserved Characters in SSML #12

Closed yacine-bens closed 1 year ago

yacine-bens commented 1 year ago

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

Migushthe2nd commented 1 year 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 1 year ago

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