elevenlabs / elevenlabs-examples

https://elevenlabs.io/docs/api-reference/getting-started
MIT License
93 stars 28 forks source link

Audio Native - get error #20

Closed arashberlin closed 2 months ago

arashberlin commented 2 months ago

Hi,

I've been attempting to enable the Audio Native feature by following your provided examples. However, I've encountered some issues in getting it operational.

I've ensured that the URLs are correctly set up in the Allowed URLs section.

Despite this, I'm facing the following errors: "Cannot read properties of undefined (reading 'message')", which seems to be a JavaScript error related to accessing a property of an undefined object.

Additionally, there's a 404 error when making a POST request to https://api.elevenlabs.io/v1/audio-native/..../convert, indicating that the server can't find the requested resource.

Could you provide guidance or a solution to resolve these errors?

Thank you for your assistance.

image

image

image

image

image

image

Mateusz-Kopec commented 2 months ago

Hi @arashberlin, thank you for reaching out!

Our article retriever needs to have access to the website where the AudioNative player is hosted. So if you are testing with localhost, it cannot get access to the website and that's where error is coming from. I'll look into making error message correct though, thanks for pointing that out.

There are few ways you can test the player locally:

  1. Use ngrok, localtunnel or similar service to expose the localhost to the world and then allowlist the exposed url in Elevenlabs.
  2. Use projects and embed the existing project - https://elevenlabs.io/docs/audio-native/overview#method-2-embed-audio-from-an-existing-project
  3. Use API to integrate - https://elevenlabs.io/docs/audio-native/overview#method-3-embed-audio-from-content-using-our-api

Let me know if that works for you!

lharries commented 2 months ago

Additionally, here's the guide for that example that discusses Ngrok, let me know if it doesn't work and I can reopen this comment https://elevenlabs.io/docs/audio-native/audio-native-react

arashberlin commented 2 months ago

Many thanks for the prompt response. I am impressed with your solution and am exploring various use cases for my company. However, I am unable to utilize the widget on our intranet, as it retrieves a response from the endpoint https://api.elevenlabs.io/v1/... and plays back the audio.

Sadly, we are not allowed to use any proxies in our environment. Your AudioNative player only works on internet (web) applications.

I can employ your API endpoint to send the text and receive the result, or alternatively, prepare the audio in advance and use it with my own custom-developed "widget".

Are you familiar with Make.com? It might be possible to use Make.com to transmit and receive data from your endpoint.

Regards Arash

lharries commented 2 months ago

If you can't load from our URL I think you'd be better using our TTS endpoint and then storing the audio on S3 or another source. Here's a tutorial for you on how to do that: https://elevenlabs.io/docs/api-reference/how-to-use-tts-with-streaming