jing332 / tts-server-android

这是一个Android系统TTS应用,内置微软演示接口,可自定义HTTP请求,可导入其他本地TTS引擎,以及根据中文双引号的简单旁白/对话识别朗读 ,还有自动重试,备用配置,文本替换等更多功能。
3.02k stars 242 forks source link

Fix EdgeTts xml escaping #181

Closed mobad closed 2 months ago

mobad commented 3 months ago

I am hearing the TTS saying &apos when it tries to read a ' I took a look at https://github.com/rany2/edge-tts/blob/master/src/edge_tts/communicate.py#L375 and I see that it's using https://github.com/python/cpython/blob/3.12/Lib/xml/sax/saxutils.py#L27 which only escapes &<> I changed it to only escape those and it seems to work fine now.