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

.vtt subtitle file problem #108

Closed sweetsmile888 closed 1 year ago

sweetsmile888 commented 1 year ago

The Punctuation of the original text in the generated .vtt subtitle file is missing, and many spaces make the text incoheren

rany2 commented 1 year ago

That's because Microsoft only returns the word without punctuation. In order for this to be fixed, the library needs to somehow restore the punctuation which is not as easy as it sounds. For example, if you input the word 162 the subtitles sometimes would have the word 162 spelled out as one sixty two. So as you can see, it's not a very simple issue to solve as the subtitles returned by Microsoft does not match the input text.