Add option to configure SentenceBoundary (#348)

* Create FUNDING.yml

* add setence boundary which is more friendly to Chinese users

---------

Co-authored-by: Rany <ranygh@riseup.net>
This commit is contained in:
chnyangjie
2025-08-05 18:06:03 +08:00
committed by GitHub
parent ffe009af9a
commit f78c8ece0a
10 changed files with 90 additions and 18 deletions

View File

@@ -72,7 +72,7 @@ async def _run_tts(args: UtilArgs) -> None:
async for chunk in communicate.stream():
if chunk["type"] == "audio":
audio_file.write(chunk["data"])
elif chunk["type"] == "WordBoundary":
elif chunk["type"] in ("WordBoundary", "SentenceBoundary"):
submaker.feed(chunk)
if args.words_in_cue > 0: