Open RABIDYOTE opened 2 months ago
I'm getting the same error. Were you able to find a fix?
Also getting the same issue
Alright, I got the fix. First change this line:
if r.json()["message"] == "Couldn't load speech. Try again.":
to:
if r.json()["message"] == "Couldn’t load speech. Try again.":
This is just a minor error in apostrophe comparison; however, the main issue is that the code thinks your sessionID is incorrect. The way I fixed this is by changing this line:
API_BASE_URL = f"https://api16-normal-v6.tiktokv.com/media/api/text/speech/invoke/"
to:
API_BASE_URL = f"https://api16-normal-useast5.us.tiktokv.com/media/api/text/speech/invoke/"
.
This should do the job!
Whenever I try to use the script with a file, it throws me this message which doesn't entirely seem to line up with any status code in particular. I've tried both using a file with multiple lines and one with just one line. I've also tried the recommended Session ID as well as my own, and making sure the aid value is set correctly.
I also tried to use it with just a text argument, but it outputs this instead:
I'm unfortunately not very code-savvy, so I'm a bit confused on what's going on and how I can rectify it.