#we are the same 😦
1 messages · Page 1 of 1 (latest)
I've got it working great in Chrome (audio/mpeg), I think getting close to Safari (audio/mpeg), and not at all yet in Firefox (doesn't support audio/mpeg).
I think I need to sniff codec playback capability (done) and then transcode from mp3 to ogg for Firefox. That's not hard.
So if I can get Safari working I might be golden.
Woo hoo! Just got it working in Safari. So now it should ACTUALLY be cross-browser. If it's Chrome/Edge/Safari you need to feed it audio/mpeg data (which ElevenLabs natively does). If it's FireFox you need to transcode it into ogg/mp4/wemb first.
Spoke too soon. Works perfectly in everything EXCEPT iOS:(
The API output is already audio. It's mp3 audio. It's just streamed in chunks. No, no library, just some code (that gpt4 came up with;) It's pretty simple.
In my case I'm using node and sending the stream to my web front-end (vanilla js), via EventSource (web API standard built in to browsers). EventSource is a text-based comm channel, though, so I converted it from the streaming format into base64 text so EventSource didn't freak out. Then in the web page I convert it back into audio data and play it.
I don't have a repo with it, but I can send you files to look at if you like.