KoljaB / RealtimeTTS

Converts text to speech in realtime
1.78k stars 159 forks source link

async not working as expected? #23

Open beetree opened 9 months ago

beetree commented 9 months ago

This code:

stream = TextToAudioStream(engine)
stream.feed("Hello")
stream.play_async()
time.sleep(0.1)
stream.feed("friend")
if stream.is_playing():
    stream.play_async()

... does only play "hello" and not "friend". However, if I comment out time.sleep() it plays both. Also, if I sleep for 2+ seconds it also plays both words.

Is this expected?

KoljaB commented 9 months ago

Not expected, thanks for pointing this out. Should be fixed with the new version.

beetree commented 9 months ago

Nice, thanks!

On Wed, Dec 20, 2023 at 8:45 AM Kolja Beigel @.***> wrote:

Not expected, thanks for pointing this out. Should be fixed with the new version.

— Reply to this email directly, view it on GitHub https://github.com/KoljaB/RealtimeTTS/issues/23#issuecomment-1864805178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC5FMUINQB2PDPBZSF3DCVTYKMI35AVCNFSM6AAAAABA4Z24TWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUHAYDKMJXHA . You are receiving this because you authored the thread.Message ID: @.***>