Gemini 3.1 Flash Live 是 Google 面向即時對話和語音優先應用的低延遲音訊對音訊模型,其模型頁把聲學細節偵測、數字精確度和多模態感知歸功於它。
- 輸入
- 文字 圖像 音訊 影片 $0.75/M
- 輸出
- 文字 音訊 $4.5/M
- 音訊輸入
- $3/M
- 音訊輸出
- $12/M
價格在同類中的位置
價格在 6 個同類模型中的位置
這條線標出這個模型的價格,在 Synthorai 的同類模型裡落在什麼位置;兩端分別是最便宜和最貴的模型。這裡列的是基礎價,批次、區域和快取寫入的折扣請見價格頁。
規格與限制
Token
| 上下文視窗(供應商規格) | 131,072 |
|---|---|
| 最大輸出(供應商規格) | 65,536 |
思考
| 供應商參數 | thinkingLevel |
|---|---|
| 可接受的值 | minimal · low · medium · high |
| 預設值 | minimal 請求未指定時生效 |
| 可關閉 | 不支援 |
| 思考行為 | 預設為 minimal 以最佳化最低延遲;Gemini 3 Live 模型以等級取代了 2.5 Live 的 thinkingBudget。 |
| 參數 | reasoning_effort |
| 參數值 | minimal · low · medium · high 這是閘道的參數,實際以上方的供應商對應為準 |
音訊
| 語言 | 支援 90 多種語言的即時多模態對話 |
|---|---|
| 音訊限制 |
|
| 串流轉錄 | 支援 |
即時語音
| 聲音 | 可使用 Gemini 文字轉語音音色集中的任何音色;原生音訊輸出模型能在對話中自然切換語言。 |
|---|---|
| 工作階段功能 |
|
模型
| 模態 | 文字 + 圖像 + 音訊 + 影片 → 文字 + 音訊 |
|---|
- 面向語音優先智慧體的低延遲音訊到音訊模型,文件記載其具備聲學細節偵測、數字精確度與多模態感知。
- 它以 thinkingLevel(minimal / low / medium / high)取代 thinkingBudget,並預設為 minimal 以取得最低延遲。
30 秒上手 gemini-3.1-flash-live
相容 OpenAI Realtime:透過 WebSocket 連線,音訊進、音訊出。WS /v1/realtime
import asyncio, base64, json, websockets
URL = "wss://synthorai.io/v1/realtime?model=gemini-3.1-flash-live"
# 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=gemini-3.1-flash-live", {
// 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=gemini-3.1-flash-live' <<'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=gemini-3.1-flash-live", 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=gemini-3.1-flash-live"), 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);關於 gemini-3.1-flash-live
- 它接受文字、影像、音訊和影片,並透過 Live API 的有狀態 WebSocket 回傳文字和音訊,輸入上限 131,072 token、輸出上限 65,536 token,是它所取代的 2.5 原生音訊模型輸出上限的八倍。
- 函式呼叫、搜尋事實依據和思考受支援,而快取、結構化輸出、程式碼執行和 Batch API 則不支援;思考深度用 thinkingLevel 設定,取值 minimal、low、medium 或 high,預設為 minimal 以取得最低延遲,取代了 2.5 世代使用的數值型 thinkingBudget。
- 遷移說明才是有用的部分,因為這次升級既有新增也有移除。
- 非同步函式呼叫尚未支援,因此呼叫是順序執行的,模型在工具回應到達之前不會開始作答;主動音訊和情感對話已經消失,相關設定必須清除。
- 單個伺服器事件現在可以一次攜帶多個內容部分,例如一個音訊塊和一段轉寫文字,因此只讀取第一個部分的用戶端會靜默丟失內容。
- 輪次覆蓋現在預設包含偵測到的音訊活動和全部影片影格,這會讓持續串流傳輸影片的應用成本上升;用戶端內容則只能用於播種初始歷史。
- Synthorai 透過 OpenAI 相容的 /v1/realtime WebSocket 端點提供它。
常見問題
gemini-3.1-flash-live API 可以免費試用嗎?
gemini-3.1-flash-live 目前是邀請制測試,不開放直接註冊,需要先申請開通。請到 Synthorai 主控台提出申請,審核通過後就按一般的用量計費方式收費,不需訂閱。
gemini-3.1-flash-live 最擅長什麼?
面向即時對話與語音優先應用的音訊對音訊模型、輸出上限是 2.5 原生音訊模型的八倍、沒有非同步函式呼叫,工具呼叫為順序執行。完整介紹請見「關於」一節,內容取自供應商官方的發布說明。
gemini-3.1-flash-live 的價格是多少?
在 Synthorai 上,gemini-3.1-flash-live 的輸入價是每百萬 token $0.75,輸出價是每百萬 token $4.5。這就是供應商官網價,平台不加價。
如何呼叫 gemini-3.1-flash-live API?
gemini-3.1-flash-live 是語音對語音(speech-to-speech)模型:用 OpenAI Realtime SDK(或原生 WebSocket)連線到 wss://synthorai.io/v1/realtime?model=gemini-3.1-flash-live,音訊進、音訊出。它不走 POST /v1/audio/transcriptions 那種上傳檔案的方式。驗證用你的 sk-syn 金鑰,只需要帶 Authorization 標頭(beta 協定已停用)。
如何開通 gemini-3.1-flash-live?
gemini-3.1-flash-live 目前是邀請制測試,請到 Synthorai 主控台申請開通。審核通過後,用法和其他模型一樣:把 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 設為 "gemini-3.1-flash-live" 就可以了。
相關模型
比較
本頁每一個數值都摘錄自供應商自己的文件(連結見上方),並附上查核日期。價格是放在整個目錄裡比較;各家供應商定義不一樣的規格,只說明差異,不畫成圖表比較。這裡沒有任何數據是我們自己量測的,也不做評分。