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

[Enhancement] turn a sentence into a subtitle, no matter how many words in the sentence #165

Closed suxinde2009 closed 6 months ago

suxinde2009 commented 6 months ago

[Enhancement] turn a sentence into a subtitle, no matter how many words in the sentence

Based on https://github.com/rany2/edge-tts/issues/137

rany2 commented 6 months ago

Thanks a lot @suxinde2009, if you could provide input on some of the cleanup/rework I did in https://github.com/rany2/edge-tts/commit/b8d3e70192984ca543eb3cc027bc2bb3aba8cd28 it would be nice! I made some changes to your submaker code

rany2 commented 6 months ago

In your version, did you intend for spinoff_sentence to take a string? https://github.com/rany2/edge-tts/commit/b8d3e70192984ca543eb3cc027bc2bb3aba8cd28#diff-a47c86b8d5608461ac8c56519b40001836954ee0669a5dd7b180b33bceb0a0f7R42-R58

Right now it is taking the last character in the text both in your original PR and now, but it seems like you meant it to be a list.