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

@@ -20,7 +20,7 @@ def main() -> None:
for chunk in communicate.stream_sync():
if chunk["type"] == "audio":
file.write(chunk["data"])
elif chunk["type"] == "WordBoundary":
elif chunk["type"] in ("WordBoundary", "SentenceBoundary"):
submaker.feed(chunk)
with open(SRT_FILE, "w", encoding="utf-8") as file: