Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElevenLabs download audio in WebGL Build #48

Open
SebastianBlandon opened this issue Nov 22, 2023 · 6 comments
Open

ElevenLabs download audio in WebGL Build #48

SebastianBlandon opened this issue Nov 22, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@SebastianBlandon
Copy link

Bug Report

Overview

I have a problem with downloading from ElevenLabs of the audios in a WebGl build of my application, follow the browser logs is by CORS, that I can not load the audios and failure to download with Utilities.WebRequestRest. Has anyone encountered this error?

Screenshots

Screenshot 2023-11-22 at 11 00 56 AM
@SebastianBlandon SebastianBlandon added the bug Something isn't working label Nov 22, 2023
@StephenHodgson
Copy link
Member

StephenHodgson commented Nov 22, 2023

Please replace screenshot with error text. I can't read it.

@StephenHodgson StephenHodgson added question Further information is requested triage and removed bug Something isn't working labels Nov 22, 2023
@SebastianBlandon
Copy link
Author

SebastianBlandon commented Nov 22, 2023

List errors:

Cross origin requests are only supported for HTTP.
Fetch API cannot load file:https:///tmp/download_cache/ElevenLabs/TextToSpeech/onwK4e9ZLuTAKqWW03F9/cF3SDAlKxqH9JJIxDtRe.ogg due to access control checks.
Utilities.WebRequestRest.RestException: Failed to download audio clip from "file:https:///tmp/download_cache/ElevenLabs/TextToSpeech/onwK4e9ZLuTAKqWW03F9/cF3SDAlKxqH9JJIxDtRe.ogg"!
  at Utilities.WebRequestRest.Rest.DownloadAudioClipAsync (System.String url, UnityEngine.AudioType audioType, System.String fileName, Utilities.WebRequestRest.RestParameters parameters, System.Threading.CancellationToken cancellationToken) [0x00000] in <00000000000000000000000000000000>:0

@StephenHodgson
Copy link
Member

I think there is an additional step you must to to enable CORS for your webgl build.

But also, I think the download cache works differently on WebGL since there isn't access to local disk.

@StephenHodgson StephenHodgson self-assigned this Nov 22, 2023
@SebastianBlandon
Copy link
Author

I'm looking for documentation on this but I can't find anything that works for me, do you have any idea if this is set in the player configuration?

@StephenHodgson
Copy link
Member

StephenHodgson commented Nov 23, 2023

I think it might actually be a bug with my com.utilities.rest library.

I'll do some validations and get back to you.

@StephenHodgson StephenHodgson added bug Something isn't working and removed question Further information is requested triage labels Nov 24, 2023
@StephenHodgson
Copy link
Member

StephenHodgson commented Dec 14, 2023

Yeah for now this package does not support WebGL.

There's too many places where I'm attempting to cache them and save them to disk.

@StephenHodgson StephenHodgson added enhancement New feature or request and removed bug Something isn't working labels Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants