I’ve been made aware that the code I’ve written to access text-to-speech from ElevenLabs API is no longer working.
I’ve tested it and it seems that the CORS-Proxy that is being used in ai-character-chat
currently doens’t allow POST
methods (which is being used to ‘post’ the text to be ‘spoken’ in ElevenLabs).
Not a major/priority issue but might be nice to be fixed. I also wonder how many are using text to speech (even just using the Speech Synthesis code) in the ai-character-chat
…
@[email protected] - There’s seems to be a fetch
POST
problem again as of now.Sorry about this! I really want to create a stable platform that people can build upon without having annoying problems, so it’s top priority for me to solve stuff like this. It’s hard enough to debug custom code without having to deal with stuff like this 😓
That said, would you be able to share a character URL? I tried this code and it worked correctly:
oc.thread.on("MessageAdded", async function() { let result = await fetch("https://httpbin.org/post", { method: "POST", headers: { "Content-Type":"application/json" }, body: JSON.stringify({foo:3}) }).then(r => r.json()); console.log("POST response:", result); });
If it works for you now, then maybe it was a temporary problem. If that’s the case, I’ll set up a monitor to do this once per minute, and see if I can catch any problems and correlate them with server logs/errors.
Here’s the character link: https://perchance.org/ai-character-chat?data=Chloe~0bbbcdc9119e3a37bf986ac033c43548.gz
Hmm, for whatever reason, that works fine for me. That said, with a VPN enabled, the response is has the 401 Unauthorized status with the following JSON instead of the audio:
{ "detail": { "status": "detected_unusual_activity", "message": "Unusual activity detected. Free Tier usage disabled..." } }
What do you see in the network panel in devtools when it doesn’t work?
Something like that too. Though, I don’t have any VPN enabled (on Microsoft Edge, Windows 10), I guess they are quite limiting the free tier API now i.e. there is a limit to consecutive requests.