KoljaB / RealtimeTTS

Converts text to speech in realtime
1.39k stars 119 forks source link

on_sentence_START_synthesized #60

Open olegchomp opened 3 months ago

olegchomp commented 3 months ago

Thanks for great repo again ) It will be great to have something like on_sentence_START_synthesized, so sentence can be printed before the speech started.

KoljaB commented 3 months ago

Idea is good, this is useful.

Synthesis start and speech start don't happen at the same time though. Synthesis is done in background and writes audio chunks into a queue. On fast systems synthesis will be completed way before speech ends. Audio queue must be extended to hold additional information about the sentence that gets played out, so that the stream player knows when a new sentence starts to play. Need to think about that a bit.