Skip to content

Commit

Permalink
fix: make TTS more smooth by not splitting at dots
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming committed Oct 26, 2023
1 parent 152aac0 commit 050bddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xiaogpt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def calculate_tts_elapse(text: str) -> float:
return len(_no_elapse_chars.sub("", text)) / speed


_ending_punctuations = ("。", "?", "!", ";", ".", "?", "!", ";")
_ending_punctuations = ("。", "?", "!", ";", "\n", "?", "!", ";")


async def split_sentences(text_stream: AsyncIterator[str]) -> AsyncIterator[str]:
Expand Down

0 comments on commit 050bddc

Please sign in to comment.