Understanding how to stream and play the generated audio isn't very straightforward for devs who are new to streaming and playing audio.
Expected
Clear sample code showing an end-to-end example or having convenience methods within this JS lib that helps people stream and play audio both for server- and client-side needs.
Example code
For now, here is some sample code others can work off of (and hopefully improve upon)
Issue
Understanding how to stream and play the generated audio isn't very straightforward for devs who are new to streaming and playing audio.
Expected
Clear sample code showing an end-to-end example or having convenience methods within this JS lib that helps people stream and play audio both for server- and client-side needs.
Example code
For now, here is some sample code others can work off of (and hopefully improve upon)
Text-to-Speech (server-side)
API Route to wrap it (since this ElevenLabs lib works only in Node envs for now)
Hook to call into API route
Audio player to play streamed readable
React code to bring it all together