GPT Realtime 是 OpenAI 第一款正式發布的即時模型:一款單一的語音對語音模型,直接以自然、有表現力的音訊聆聽與回應,而不是串聯獨立的轉寫與合成模型。
- 輸入
- 音訊 文字 $4/M
- 輸出
- 音訊 文字 $16/M
- 音訊輸入
- $32/M
- 音訊輸出
- $64/M
- 快取讀取
- $0.4/M
- 知識截止
- 2023-10
Benchmark 成績
GPT Realtime:公布了 8 項,但沒有一項是足夠多的其他模型也測過的,無法比較。
價格在同類中的位置
價格在 6 個同類模型中的位置
這條線顯示該模型的價格,在 Synthorai 上同類模型裡處於什麼位置。兩端標出了最便宜和最貴的那個。這裡是基礎價,批次、區域與快取寫入的折扣見價格頁。
規格與限制
Token
| 上下文視窗(廠商規格) | 32,000 |
|---|---|
| 最大輸出(廠商規格) | 4,096 |
| 知識截止 | 2023-10 |
提示詞快取
| 快取方式 | 自動 |
|---|---|
| 最低前綴 | 1,024 |
| 存活時間 | 5–10 分鐘,最長 1 小時 |
即時語音
| 工作階段能力 | 透過 WebSocket 的原生語音到語音 · 函式呼叫 · 32K 上下文 |
|---|
模型
| 模態 | 音訊 + 文字 → 音訊 + 文字 |
|---|
- OpenAI 首個正式發布的即時模型(快照 gpt-realtime-2025-08-28):原生語音到語音,支援函式呼叫
- 32k 上下文
30 秒用上 GPT Realtime
相容 OpenAI Realtime:透過 WebSocket 連線,音訊進、音訊出。WS /v1/realtime
import asyncio, base64, json, websockets
URL = "wss://synthorai.io/v1/realtime?model=gpt-realtime"
# Send ONLY the Authorization header - the beta protocol is retired.
HEADERS = {"Authorization": "Bearer sk-syn-..."}
async def main():
async with websockets.connect(URL, additional_headers=HEADERS) as ws:
# 1) configure the speech-to-speech session
await ws.send(json.dumps({
"type": "session.update",
"session": {
"type": "realtime",
"output_modalities": ["audio"],
"audio": {"output": {"voice": "alloy"}},
},
}))
# 2) send input audio (base64 PCM16), then request a spoken reply
await ws.send(json.dumps({"type": "input_audio_buffer.append", "audio": pcm16_b64}))
await ws.send(json.dumps({"type": "input_audio_buffer.commit"}))
await ws.send(json.dumps({"type": "response.create"}))
# 3) stream the model's audio (and text) back
async for raw in ws:
ev = json.loads(raw)
if ev["type"] == "response.audio.delta":
play(base64.b64decode(ev["delta"])) # audio out
elif ev["type"] == "response.done":
break
asyncio.run(main())import WebSocket from "ws";
const ws = new WebSocket("wss://synthorai.io/v1/realtime?model=gpt-realtime", {
// Send ONLY the Authorization header — the beta protocol is retired.
headers: { Authorization: "Bearer sk-syn-..." },
});
ws.on("open", () => {
// configure the speech-to-speech session
ws.send(JSON.stringify({ type: "session.update", session: {
type: "realtime", output_modalities: ["audio"], audio: { output: { voice: "alloy" } },
} }));
// send input audio (base64 PCM16), then request a spoken reply
ws.send(JSON.stringify({ type: "input_audio_buffer.append", audio: pcm16Base64 }));
ws.send(JSON.stringify({ type: "input_audio_buffer.commit" }));
ws.send(JSON.stringify({ type: "response.create" }));
});
ws.on("message", (raw) => {
const ev = JSON.parse(raw.toString());
if (ev.type === "response.audio.delta") playAudio(Buffer.from(ev.delta, "base64")); // audio out
else if (ev.type === "response.done") ws.close();
});# Realtime is a WebSocket protocol - use a WS client such as websocat.
# Each line below is one OpenAI Realtime event (JSON) sent to the session.
websocat -H 'Authorization: Bearer sk-syn-...' \
'wss://synthorai.io/v1/realtime?model=gpt-realtime' <<'EOF'
{"type":"session.update","session":{"type":"realtime","output_modalities":["audio"],"audio":{"output":{"voice":"alloy"}}}}
{"type":"input_audio_buffer.append","audio":"<base64-pcm16>"}
{"type":"input_audio_buffer.commit"}
{"type":"response.create"}
EOF
# Responses stream back as response.audio.delta (base64 audio out) … response.donepackage main
import (
"net/http"
"github.com/gorilla/websocket"
)
func main() {
h := http.Header{}
h.Set("Authorization", "Bearer sk-syn-...")
// Send ONLY the Authorization header — the beta protocol is retired.
c, _, err := websocket.DefaultDialer.Dial("wss://synthorai.io/v1/realtime?model=gpt-realtime", h)
if err != nil {
panic(err)
}
defer c.Close()
// configure the speech-to-speech session, send audio, request a spoken reply
c.WriteJSON(map[string]any{"type": "session.update", "session": map[string]any{
"type": "realtime", "output_modalities": []string{"audio"},
"audio": map[string]any{"output": map[string]any{"voice": "alloy"}}}})
c.WriteJSON(map[string]any{"type": "input_audio_buffer.append", "audio": pcm16B64})
c.WriteJSON(map[string]any{"type": "input_audio_buffer.commit"})
c.WriteJSON(map[string]any{"type": "response.create"})
for {
var ev struct {
Type string `json:"type"`
Delta string `json:"delta"`
}
if err := c.ReadJSON(&ev); err != nil {
return
}
if ev.Type == "response.audio.delta" {
playAudio(ev.Delta) // base64 audio out
} else if ev.Type == "response.done" {
return
}
}
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.WebSocket;
import java.util.concurrent.CompletionStage;
// JDK built-in WebSocket — no extra dependency needed.
WebSocket ws = HttpClient.newHttpClient().newWebSocketBuilder()
.header("Authorization", "Bearer sk-syn-...")
// Send ONLY the Authorization header — the beta protocol is retired.
.buildAsync(URI.create("wss://synthorai.io/v1/realtime?model=gpt-realtime"), new WebSocket.Listener() {
public CompletionStage<?> onText(WebSocket w, CharSequence data, boolean last) {
// handle response.audio.delta (base64 audio out) / response.done here
w.request(1);
return null;
}
}).join();
// configure the session, send input audio, then request a spoken reply
ws.sendText("{\"type\":\"session.update\",\"session\":{\"type\":\"realtime\",\"output_modalities\":[\"audio\"],\"audio\":{\"output\":{\"voice\":\"alloy\"}}}}", true);
ws.sendText("{\"type\":\"input_audio_buffer.append\",\"audio\":\"<base64-pcm16>\"}", true);
ws.sendText("{\"type\":\"input_audio_buffer.commit\"}", true);
ws.sendText("{\"type\":\"response.create\"}", true);關於 GPT Realtime
- 它具備 32K token 上下文視窗與 4,096 最大輸出 token,支援面向語音智慧體工作流的函式呼叫,接受音訊或文字輸入並輸出音訊與文字;音訊與文字按各自的單 token 費率計費,並提供折扣的快取輸入。
- 會話可以透過 WebRTC 驅動瀏覽器與行動用戶端,在伺服器已經持有音訊串流時透過 WebSocket 驅動,或透過 SIP 驅動電話智慧體,並由伺服器端的語音活動偵測切分語音,在來電者打斷時截斷尚未播放的音訊。
- 模型頁面也把影像輸入與文字、音訊並列,而音色是在每個會話中從 OpenAI 公布的音色集裡挑選的,但要注意一旦會話已經送出音訊,音色就無法再更換。
- 它沒有推理力度控制(那要到 2.1 世代才出現),知識截止為 2023 年 10 月。
- OpenAI 此後已宣布它的棄用,關閉時間排定在 2027 年 1 月,並指定 GPT Realtime 2.1 為遷移目標,因此新的語音工作應該放在 2.1 上,而既有整合仍有緩衝期。
- 它仍以即時家族最初的正式發布快照形式提供。
- Synthorai 透過 OpenAI 相容的 /v1/realtime WebSocket 端點提供 GPT Realtime,因此官方 Realtime SDK 用戶端無需改動即可連線。
常見問題
GPT Realtime API 可以免費試用嗎?
GPT Realtime 目前處於邀請制測試階段,需申請開通,而非開放註冊。請在 Synthorai 主控台提交申請,審核通過後即依標準的按用量計費方式收費,無需訂閱。
GPT Realtime 最擅長什麼?
單模型語音對語音,無轉寫鏈路、自然富表現力音訊,支援函式呼叫、即時家族最初的 GA 快照。完整能力請見「關於」一節,內容取自廠商官方發布說明。
GPT Realtime 的價格是多少?
在 Synthorai 上,GPT Realtime 輸入 $4/百萬 token、輸出 $16/百萬 token,即廠商牌價,無平台加價。快取命中的輸入 token 以 $0.4/M 計費。
如何呼叫 GPT Realtime API?
GPT Realtime 是語音對話(speech-to-speech)模型:透過 WebSocket 連線 wss://synthorai.io/v1/realtime?model=gpt-realtime,使用 OpenAI Realtime SDK(或原生 WebSocket)即可,音訊輸入、音訊輸出。它不是 POST /v1/audio/transcriptions 檔案上傳介面。以你的 sk-syn key 驗證,只送 Authorization 標頭(beta 協定已下線)。
如何開通 GPT Realtime?
GPT Realtime 處於邀請制測試階段:請在 Synthorai 主控台申請開通。審核通過後,用法與其他模型相同:把 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 設為 "gpt-realtime" 即可。
相關模型
對比
本頁每個值都轉錄自廠商自己的文件(連結見上),並帶有核對日期。價格在全目錄範圍內比較;各廠商定義不同的規格值,只說明差異而不作圖表對比。此處沒有任何由我們測量的資料,也不做評分。