elevenlabs-python icon indicating copy to clipboard operation
elevenlabs-python copied to clipboard

Async client doesn't support streaming input

Open BackSlasher opened this issue 1 year ago • 11 comments

https://github.com/elevenlabs/elevenlabs-python/blob/6db2fdd7458ce5c7f1bbdc2c3936784f995acd44/src/elevenlabs/client.py#L322

If one wants to provide a stream as input, they have to use the sync client, choosing between complicating their codebase or losing async's benefits

BackSlasher avatar Aug 14 '24 21:08 BackSlasher

@dsinghvi I see you were involved in #67. Do you know whether the team is working on this? Will they be accepting contributions?

BackSlasher avatar Aug 14 '24 21:08 BackSlasher

@BackSlasher ill take a look at your PR this weekend!

dsinghvi avatar Aug 23 '24 13:08 dsinghvi

@dsinghvi hey, any news? :)

BackSlasher avatar Sep 09 '24 15:09 BackSlasher

@BackSlasher looks like there was a compile issue and the test failed to run in CI, so I had to revert. do you mind recreating the PR?

dsinghvi avatar Sep 11 '24 13:09 dsinghvi

Resubmit the same one? You betcha

BackSlasher avatar Sep 11 '24 13:09 BackSlasher

@dsinghvi any news? :)

BackSlasher avatar Sep 22 '24 08:09 BackSlasher

@dsinghvi sorry for bothering you, could we get this merged?

BackSlasher avatar Oct 19 '24 11:10 BackSlasher

👋 I tested this locally on my own fork and it works great, though I would make one change - currently you're checking for AsyncIterator (https://github.com/elevenlabs/elevenlabs-python/pull/358/files#diff-75cbcf7bd37482fe5efdb55e35469453cc1380dfd25609b7f9e52bb5a9808bc1R416) which works fine for async generators, but can exclude some valid async iterables (e.g. a custom class that defines __aiter__ but not __anext__). Changing this to AsyncIterable instead allows these types of iterators. Thanks!

zhudotexe avatar Oct 25 '24 22:10 zhudotexe

I had issue that streaming code was not generating audio until while input is read. ( https://github.com/elevenlabs/elevenlabs-python/issues/395 ) I wonder if it's related to this #344 issue or sth else and if therefore your PR will help 🤞🏻 .

gwpl avatar Oct 29 '24 15:10 gwpl

Hey - we also need that. Would love this to be merged 🙏🏼

rootux avatar Dec 02 '24 08:12 rootux

hey guys thanks for the issue! i will work on getting this merged soon, thanks for your patience

AngeloGiacco avatar Feb 03 '25 19:02 AngeloGiacco