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

  • perchance@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 month ago

    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(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.