Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

fix: TTS make a pause with a multi-line content

Clémence Lesné11819edf7678
diff --git a/helpers/call.py b/helpers/call.py
index 3963cce..d8337ba 100644
--- a/helpers/call.py
+++ b/helpers/call.py
@@ -35,8 +35,6 @@ def tts_sentence_split(text: str, include_last: bool) -> Generator[str, None, No
"""
Split a text into sentences.
"""
- # Clean and remove extra spaces
- text = " ".join(text.split())
# Split by sentence by punctuation
splits = re.split(_SENTENCE_PUNCTUATION_R, text)
for i, split in enumerate(splits):