Why:
Allowing the async client to utilize incoming text streams when generating voice. Very useful when feeding the realtime output of an LLM into the TTS.
Closes #344
What:
Copied RealtimeTextToSpeechClient and text_chunker into AsyncRealtimeTextToSpeechClient and async_text_chunker Most of the logic is intact, aside from async stuff
Added AsyncRealtimeTextToSpeechClient into AsyncElevenLabs just like RealtimeTextToSpeechClient is in ElevenLabs
Added rudimentary testing
The code is basically a copy-paste of what I found in the repo. We can rewrite it to be more elegant, but I figured parity with the sync code is more important.
Why: Allowing the async client to utilize incoming text streams when generating voice. Very useful when feeding the realtime output of an LLM into the TTS.
Closes #344
What:
RealtimeTextToSpeechClient
andtext_chunker
intoAsyncRealtimeTextToSpeechClient
andasync_text_chunker
Most of the logic is intact, aside from async stuffAsyncRealtimeTextToSpeechClient
intoAsyncElevenLabs
just likeRealtimeTextToSpeechClient
is inElevenLabs
The code is basically a copy-paste of what I found in the repo. We can rewrite it to be more elegant, but I figured parity with the sync code is more important.