【解密】ChatGPT 的语音通话接口(LiveKit)

周末看了部【解密】电影,有感而发。C站 不也是因这而起的吗

今天刚注册成功 :tada::tada:

分享一个 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

具体实现原理:ChatGPT 中使用 livekit 实现视频会议 | dairoot的博客

43 个赞

佬,高级语音有没有

3 个赞

高级语音,我目前没号体验过,如果有号的话,我可以尝试分析看看

3 个赞

感谢分享

1 个赞

没,我一个号都没有这个,哭死

3 个赞

我每天都点一下语音,期待着有那么一天就变成 高级语音 :joy:

感谢分享! :heart: :+1:

2 个赞

ε=(´ο`*)))唉
这个有办法在网页版上查看嘛

1 个赞

我也是,好想玩高级语音 :tieba_087:

2 个赞

感谢大佬,学习技术了

什么意思,这个就是网页版接口的

感谢分享!! :+1: :+1:

不是不是,我说高级语音,能不能在网页看自己有没有加入高级内测

没高级语音号,所以不清楚高级语音返回的格式是咋样的。 :joy:

1 个赞

佬们使用成功了吗,我用edge没反应

复制完整链接了吗。一个链接只能打开一次,也不能刷新页面

我这边页面是可以正常打开的,就是我说话然后页面无反应

直连官网的,可能需要翻墙。还有不能打开摄像头!!!


是的,不知道为啥没反应,我用的edge 和 chrome

我这边试了有反应,你试下一Github里面的体验网址,看行不行

1 个赞