Hi,
I’m trying to use Eleven Labs text-to-speech API to generate and then play MP3s.
I request in their default format – “output_format=mp3_44100_128” using an AJAX request.
But I’m not sure how to play it.
I’m assuming I need to pass it to a Binary Data object first and have tried:
- BinaryData – set from base64 (this produces no data)
- AJAX – Set response binary -> Destination = BinaryData (also produces no data)
- BinaryData – set from text (this does produce data)
(If I download this via Browser – Invoke Download for string = BinaryData.GetAllText, MIME type = “audio/mpeg), it downloads something, but it won’t play)
I’ve then tried:
- Audio – Add remote URL = BinaryData (type = audio/mpeg) and added a tag
- Audio – play tag
But this returns:
Failed to load audio 'blob:https://preview.construct.net/<some UID>': EncodingError: Unable to decode audio data
Any ideas? I don’t really want to use JavaScript but importantly, I need to be able to use C3’s effects – specifically the audio analyser so I can animate a sprite based on the audio’s level.