周末看了部【解密】电影,有感而发。C站 不也是因这而起的吗
今天刚注册成功 

分享一个 ChatGPT 语音通话接口。
事实上,这项功能早在很久之前就被破解了。
始皇的镜像站也是早早的就拥有了网页语音通话功能,但在C站一直未曾公开其实现原理。
今天,我将揭示这段代码,供大家理解其中原理
import uuid
import requests
token = "替换为自己的 ChatGPT Token:获取地址:https://chatgpt.com/api/auth/session"
headers = {
"content-type": "application/json",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
"authorization": "Bearer {}".format(token),
}
res = requests.post("https://chatgpt.com/voice/get_token", headers=headers, cookies={'__cf_bm': ''}, json={
"voice": "cove",
"voice_mode": "standard",
"parent_message_id": str(uuid.uuid4()),
"model_slug": "auto",
"voice_training_allowed": False,
"enable_message_streaming": False,
"language": "zh",
"video_training_allowed": False,
"voice_session_id": str(uuid.uuid4())
}).json()
# livekit 官方地址
livekit_url = "https://meet.livekit.io/custom?liveKitUrl={}&token={}#{}".format(
res["url"], res["token"], res["e2ee_key"])
print(livekit_url)
打开输出的链接,即可体验 ChatGPT 语音通话,不支持开启摄像头。
Github 地址:GitHub - dairoot/chatgpt-livekit

