added chatgpt wrap, tts phone number splitting
This commit is contained in:
@@ -78,6 +78,9 @@ class TTSStream:
|
||||
def tts_speak(self, text):
|
||||
self.play_buffer_size = 512
|
||||
|
||||
# separate long sequences of numbers in text string (for example 123456789) into packets of 3 (123 456 789)
|
||||
text = re.sub(r"(\d{3})(?=\d)", r"\1 ", text)
|
||||
|
||||
|
||||
# open pyaudio stream
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
Reference in New Issue
Block a user