Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 892 Bytes

README.md

File metadata and controls

58 lines (35 loc) · 892 Bytes

OpenAI Realtime API Python Implementation Demo

基于Python的简单OpenAI实时API应用示例

零延迟对话,可以随时打断。

后续会添加更多功能,如function call等。

使用前准备

在项目目录下创建.env文件,写入你的OpenAI apikey:

OPENAI_API_KEY=sk-xxx

安装依赖

pip install -r requirements.txt

运行

python main.py

OpenAI Realtime API Python Implementation Demo

A simple Python-based example for OpenAI Realtime API application.

Zero-latency conversation, can be interrupted at any time.

More features will be added later, such as function calls.

Preparation

Create a .env file in the project directory and add your OpenAI API key:

OPENAI_API_KEY=sk-xxx

Install Dependencies

pip install -r requirements.txt

Run

python main.py