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

@@ -10,11 +10,11 @@ from typing_extensions import Literal, NotRequired, TypedDict
class TTSChunk(TypedDict):
"""TTS chunk data."""
type: Literal["audio", "WordBoundary"]
type: Literal["audio", "WordBoundary", "SentenceBoundary"]
data: NotRequired[bytes] # only for audio
duration: NotRequired[float] # only for WordBoundary
offset: NotRequired[float] # only for WordBoundary
text: NotRequired[str] # only for WordBoundary
duration: NotRequired[float] # only for WordBoundary and SentenceBoundary
offset: NotRequired[float] # only for WordBoundary and SentenceBoundary
text: NotRequired[str] # only for WordBoundary and SentenceBoundary
class VoiceTag(TypedDict):