VaRest ElevenLabs API Audio Stream

Using VaRest I’m trying to tap into the ElevenLabs API. Now ElevenLabs starts to play the content while the audio is still generating in chucks. What I’ve seen so far is you have to wait for the audio to fully generate, then download the file to a save path, then load it into Unreal, but this is too slow. Is there a way to take the file and stream it directly into the engine?

did you get this to work

Yes and No, ElevenLabs works but the response takes forever. Like 30 seconds if the chatbots response is long

1 Like

Hi, Can you share your code? I’m trying to do the same thing but the engine always always crashes when converting the raw data to wav file. How do you receive the response content and convert it to playable audio? I’ve tried the runtime audio importer and AZSpeech plugins with not luck.
Solved It.

I’ve done it using this plugin

I have same Question .

would you mind also sharing the varest portion of your code? I can’t seem to setup my request properly

EDIT: nevermind, I was able to setup the request properly but now I am running into an issue where Unreal crashes when converting the data to wav/mp3. What was your solve if you found one?

EDIT 2: seems as though my request is not picking up my api key so it must be formatted wrong?

We moved away from VaRest because we were getting inconsistent results. So that code is long gone :confused: Apologies. We ended up creating our own plugin

Sorry, Can’t share code. But I construct JSON Request then set URL and headers then get the object of that request and set string and number fields then execute process request, when I receive the data I get its content then I run “Import audio from buffer” from the above plugin, and choose MP3 then I play sound 2d.

How did you set up your request? I am currently struggling to get the body setup properly. My headers seem to work fine but the body info with message ad model ID dont seem to be working for me. Any help would be greatly appreciated.

Sorry for the late reply, just like I have stated above. I get the the “object” from the constructed “request” then in that object I set string field and number field then execute process request. That’s it.

Great information .