Open aaa3334 opened 3 months ago
Still having the same issue.. wondered if it was the sessionid but doesnt seem to make a difference when I refresh it with a new one.. (also it says here that should be error 5). Anyone having any difficulties or is it working for you? Note am based in australia and have tried multiple different possible api links I have found online - some give actual errors but the ones which seem to potentially be valid just send me a status 1 code..
same for me, aid value is wrong
same for me, aid value is wrong
Did you find the right aid value?
Is anyone currently using it? I have been getting status error 1. When looking at the error page it says it could be because the params are wrong.. but they seem to be correct here. Any ideas?
Note this is the request url and this is the response I get
https://api16-normal-useast5.us.tiktokv.com/media/api/text/speech/invoke/?text_speaker=en_us_002&req_text=Testing+text+here&speaker_map_type=0&aid=1233 {'status': 'Couldn’t load speech. Try again.', 'status_code': 1, 'status_msg': 'Couldn’t load speech. Try again.'}
(Have tried both of these base urls here: API_BASE_URL = f"https://api16-normal-v6.tiktokv.com/media/api/text/speech/invoke/" API_BASE_URL_2="https://api16-normal-useast5.us.tiktokv.com/media/api/text/speech/invoke/")
Note I did try to find a different base url incase that was the issue, but any I got an error when trying to request them, so I don't think its the base url here thats the issue... any ideas on what could be causing the error?
This is what https://github.com/oscie57/tiktok-voice/wiki/Status-Codes says: status_code: 1
Status Code 1 is caused by an incorrect aid value in the request parameters. The set value should be 1233.
There is another case with status code 1, where a parameter isn't passed, either text_speaker or req_text is missing.
But as you can see in the url's (?text_speaker=en_us_002&req_text=Testing+text+here&speaker_map_type=0&aid=1233), this does not seem to be the reason...
Note this is the top of my function (just edited slightly to stop status error 1 crashing it)
API_BASE_URL = f"https://api16-normal-v6.tiktokv.com/media/api/text/speech/invoke/" API_BASE_URL_2="https://api16-normal-useast5.us.tiktokv.com/media/api/text/speech/invoke/"
USER_AGENT = f"com.zhiliaoapp.musically/2022600030 (Linux; U; Android 7.1.2; es_ES; SM-G988N; Build/NRD90M;tt-ok/3.12.13.1)"
def tts(session_id: str, text_speaker: str = "en_us_002", req_text: str = "TikTok Text To Speech", filename: str = 'voice.mp3', play: bool = False):