├── docs
├── ty.jpg
└── zs.jpg
├── README_CN.md
├── README.md
└── main.py
/docs/ty.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dairoot/chatgpt-livekit/HEAD/docs/ty.jpg
--------------------------------------------------------------------------------
/docs/zs.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dairoot/chatgpt-livekit/HEAD/docs/zs.jpg
--------------------------------------------------------------------------------
/README_CN.md:
--------------------------------------------------------------------------------
1 | # ChatGPT 中使用 livekit 实现视频会议
2 |
3 | **目前视频会出现负载过高**,期待ChatGPT 逐步开放
4 |
5 |
6 |
7 | ### 使用方法
8 | 修改文件中的 `token` 值后,执行命令,将输出地址,在浏览器打开
9 | ```bash
10 | python main.py
11 | ```
12 | 
13 |
14 | ---
15 |
16 | 若没有ChatGPT Token,又想尝鲜,可以直接访问:https://chatgpt.dairoot.cn 点击`免费体验`
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Using livekit for Video Conferencing in ChatGPT
2 | English / [简体中文](./README_CN.md)
3 |
4 | **Current video load is too high**, looking forward to ChatGPT gradually opening up.
5 |
6 |
7 |
8 | ### Usage
9 | Modify the `token` value in the file, then execute the command. The output URL will be generated. Open it in your browser.
10 |
11 | ```bash
12 | python main.py
13 | ```
14 | 
15 |
16 | ---
17 |
18 | If you don't have a ChatGPT Token and want to try it out, you can directly visit: https://chatgpt.dairoot.cn and click on `免费体验`
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | import uuid
2 |
3 | import requests
4 |
5 | chatgpt_token = None
6 |
7 |
8 | def get_livekit_url():
9 | headers = {
10 | "content-type": "application/json",
11 | "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",
12 | "authorization": "Bearer {}".format(chatgpt_token),
13 | }
14 |
15 | res = requests.post("https://chatgpt.com/voice/get_token", headers=headers, cookies={'__cf_bm': ''}, json={
16 | "voice": "cove",
17 | "voice_mode": "standard",
18 | "parent_message_id": str(uuid.uuid4()),
19 | "model_slug": "auto",
20 | "voice_training_allowed": False,
21 | "enable_message_streaming": False,
22 | "language": "zh",
23 | "video_training_allowed": False,
24 | "voice_session_id": str(uuid.uuid4())
25 | }).json()
26 |
27 | # livekit url
28 | livekit_url = "https://meet.livekit.io"
29 | url = "{}/custom?liveKitUrl={}&token={}#{}".format(livekit_url, res["url"], res["token"], res["e2ee_key"])
30 | return url
31 |
32 |
33 | if not chatgpt_token:
34 | print("Get ChatGPT Token: https://chatgpt.com/api/auth/session")
35 | else:
36 | print(get_livekit_url())
37 |
--------------------------------------------------------------------------------