Weilbyte / tiktok-tts

Generate TikTok Text-to-Speech voices in your browser
https://weilbyte.github.io/tiktok-tts/
MIT License
400 stars 86 forks source link

https://tiktok-tts.weilnet.workers.dev/api/generation is returning 500 #54

Open cunhar opened 4 weeks ago

cunhar commented 4 weeks ago
{
    "success": false,
    "data": null,
    "error": "Couldn’t load speech. Try again."
}
cunhar commented 4 weeks ago

@Weilbyte are you around?

Weilbyte commented 4 weeks ago

What is the request you are sending?

cunhar commented 4 weeks ago
{
    "text": "Fighters, prepare to face Bones in battle!",
    "voice": "en_us_006"
}
cunhar commented 4 weeks ago

{ "text": "Fighters, prepare to face Bones in battle!", "voice": "en_us_006" } On Sat, Oct 26, 2024 at 5:10 PM Weilbyte @.***> wrote:

What is the request you are sending?

— Reply to this email directly, view it on GitHub https://github.com/Weilbyte/tiktok-tts/issues/54#issuecomment-2439635398, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM5R36GX4I3C25W3B7OPZDZ5O5GBAVCNFSM6AAAAABQUFHHKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGYZTKMZZHA . You are receiving this because you authored the thread.Message ID: @.***>

cunhar commented 4 weeks ago

your main site is working fine, but your workers.dev and other sites as well are down with similar messages i tried to spin up my own based on another project and also get an error with the tiktok api -- @Weilbyte

Xkipper commented 3 weeks ago
POST https://tiktok-tts.weilnet.workers.dev/api/generation 500 (Internal Server Error)
{
    text: 'boom boom',
    voice: 'es_mx_002'
}
Letsbeginner commented 3 weeks ago

Confirmed. I am getting the 500 error. Please assist.

   POST https://tiktok-tts.weilnet.workers.dev/api/generation 500 (Internal Server Error)
cunhar commented 3 weeks ago

Looks like the session id is now associated with an endpoint

On Sun, Oct 27, 2024, 3:04 PM Letsbeginner @.***> wrote:

Confirmed. I am getting the 500 error. Please assist.

POST https://tiktok-tts.weilnet.workers.dev/api/generation 500 (Internal Server Error)

— Reply to this email directly, view it on GitHub https://github.com/Weilbyte/tiktok-tts/issues/54#issuecomment-2440058434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM5R35SXZ4BWHJKDYCAHKDZ5T6IBAVCNFSM6AAAAABQUFHHKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBQGA2TQNBTGQ . You are receiving this because you authored the thread.Message ID: @.***>

Letsbeginner commented 3 weeks ago

Can you explain? is it working on your end now?

cunhar commented 3 weeks ago

No, it's not. I ran my own tests locally and noticed the issue. The maintainer will probably address it soon in this project

On Sun, Oct 27, 2024, 3:11 PM Letsbeginner @.***> wrote:

Can you explain? is it working on your end now?

— Reply to this email directly, view it on GitHub https://github.com/Weilbyte/tiktok-tts/issues/54#issuecomment-2440061191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM5R34YSO2XPIJ3LF62BWLZ5T7DFAVCNFSM6AAAAABQUFHHKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBQGA3DCMJZGE . You are receiving this because you authored the thread.Message ID: @.***>

Weilbyte commented 3 weeks ago

It seems to be an issue with how the framework used for the Worker HTTP server is parsing the request body. @cunhar how exactly are you sending the requests (e.g. directly with cURL)?

cunhar commented 3 weeks ago

I use a JavaScript project

On Sun, Oct 27, 2024, 6:25 PM Weilbyte @.***> wrote:

It seems to be an issue with how the framework used for the Worker HTTP server is parsing the request body. @cunhar https://github.com/cunhar how exactly are you sending the requests (e.g. directly with cURL)?

— Reply to this email directly, view it on GitHub https://github.com/Weilbyte/tiktok-tts/issues/54#issuecomment-2440127064, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM5R35OEDX7MOARQLAIMYDZ5UOY5AVCNFSM6AAAAABQUFHHKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBQGEZDOMBWGQ . You are receiving this because you were mentioned.Message ID: @.***>

Weilbyte commented 3 weeks ago

Can you share me the part of the code that sends the request?

Weilbyte commented 3 weeks ago

For example, this code works for me:

const url = 'https://tiktok-tts.weilnet.workers.dev/api/generation';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"text":"Hello","voice":"en_us_001"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
cunhar commented 3 weeks ago

It's very similar. The endpoints were not responding with the sound data. It was saying a generic 500

On Sun, Oct 27, 2024, 6:38 PM Weilbyte @.***> wrote:

For example, this code works for me:

const url = 'https://tiktok-tts.weilnet.workers.dev/api/generation';const options = { method: 'POST', headers: {'content-type': 'application/json'}, body: '{"text":"Hello","voice":"en_us_001"}'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}

— Reply to this email directly, view it on GitHub https://github.com/Weilbyte/tiktok-tts/issues/54#issuecomment-2440131377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM5R34MSHUABLLJXTT3M7TZ5UQKJAVCNFSM6AAAAABQUFHHKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBQGEZTCMZXG4 . You are receiving this because you were mentioned.Message ID: @.***>

Xkipper commented 3 weeks ago

For example, this code works for me:

const url = 'https://tiktok-tts.weilnet.workers.dev/api/generation';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"text":"Hello","voice":"en_us_001"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}

Now work. Thanks You <3

Letsbeginner commented 3 weeks ago

I am pretty sure this is solved, hallelujah! It seems to have been something on Weilbytes end, because I had the same error, but my code wasn't changed. I sent my request based on the instructions. And now, its working and my code wasn't changed. It fixed itself on its own; however, I am still curious to what it was.