DEV Community

Cover image for Using livekit for Video Conferencing in ChatGPT
justme
justme

Posted on

Using livekit for Video Conferencing in ChatGPT

Using livekit for Video Conferencing in ChatGPT
Detailed Document:https://github.com/dairoot/chatgpt-livekit/tree/main

Usage

Modify the token value in the file, then execute the command. The output URL will be generated. Open it in your browser.

python main.py
Enter fullscreen mode Exit fullscreen mode

main.py file

import uuid

import requests

chatgpt_token = None


def get_livekit_url():
    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(chatgpt_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 url
    livekit_url = "https://meet.livekit.io"
    url = "{}/custom?liveKitUrl={}&token={}#{}".format(livekit_url, res["url"], res["token"], res["e2ee_key"])
    return url


if not chatgpt_token:
    print("Get ChatGPT Token: https://chatgpt.com/api/auth/session")
else:
    print(get_livekit_url())
Enter fullscreen mode Exit fullscreen mode

show

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 免费体验

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more