Overview
This skill packages a complete GPT-Live WebRTC voice demo:
- Web frontend(
scripts/index.html): a pure browser WebRTC client, including call controls, event log, and per-second billing display - Relay server(
scripts/server.mjs): Node.js/Express, responsible for requesting a WebRTC session from OpenAI and forwarding delegated tasks to the Starchild agent - Deployment instructions(
references/deploy.md): local development and production deployment steps
Architecture
浏览器 (index.html)
│ WebRTC audio
│ DataChannel (oai-events)
▼
OpenAI GPT-Live (gpt-live-1)
│ client delegation 事件
▼
server.mjs (/api/agent)
│ HTTP SSE stream
▼
Starchild agent (localhost:8000/chat/stream)
│ 结果回传
▼
GPT-Live → 语音播报
Quick start
1. Install dependencies
cd <skill-dir>/scripts
npm install
2. Prepare an OpenAI API key (required reading for installers)
This skill depends on OpenAI's gpt-live-1 realtime voice model,has no built-in key, and cannot apply for one on your behalf.
Before use, please prepare it yourself:
- Go to https://platform.openai.com/api-keys to create an API key (
sk-...format); - The account must already have gpt-live-1 (Realtime Beta) access—apply for it in the OpenAI backend; if not enabled, it will report 403/model_not_found;
- Write the key into an environment variable (or the
.env):
export OPENAI_API_KEY=sk-... # 必填,需 gpt-live-1 访问权限
export PORT=3000 # 可选,默认 3000
When there is no valid key,
/api/sessionwill return 401, and the browser side will show "unable to start call".
3. Start the service
node server.mjs
Then open http://localhost:3000 to start the voice call.
Prerequisite: the Starchild agent's
/chat/streamendpoint must be running atlocalhost:8000; if you use this skill within the Starchild platform, this endpoint is already available automatically.
File description
| File | Description |
|---|---|
scripts/server.mjs |
Express relay server (WebRTC session proxy + brain bridge) |
scripts/index.html |
Browser frontend (WebRTC + UI + billing meter) |
scripts/package.json |
Node.js dependencies (express, openai) |
references/deploy.md |
Complete guide for local development and production deployment |
references/api-notes.md |
GPT-Live delegation API key points and known pitfalls |
Scenarios for using this skill
When the user requests:
- Start / demo the GPT-Live voice demo
- Modify the voice operator's system prompt (
LIVE_PROMPT) - Adjust the delegation strategy (when to delegate to the Starchild brain)
- Deploy to production (Fly.io / Docker / Nginx reverse proxy)
→ read references/deploy.md for complete steps.
Notes
- You must provide your own
OPENAI_API_KEYbefore use (see "Quick start · Step 2"); gpt-live-1 (Realtime Beta) access must be enabled, otherwise the call cannot be established - The service listens only locally by default; before production deployment, add authentication in
/api/sessionAdd authentication - Tasks and voice history are persisted to the
data/directory (debounced writes to disk), and are not lost on restart; completed tasks are retained for 1 hour - Billing estimates are based on $0.05/minute (gpt-live-1 voice); backend brain call costs are billed separately