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 输入 $0.75/百万 token、输出 $4.5/百万 token,即厂商牌价,无平台加价。
如何调用 gemini-3.1-flash-live API?
gemini-3.1-flash-live 是语音对话(speech-to-speech)模型:通过 WebSocket 连接 wss://synthorai.io/v1/realtime?model=gemini-3.1-flash-live,用 OpenAI Realtime SDK(或原生 WebSocket)即可,音频输入、音频输出。它不是 POST /v1/audio/transcriptions 文件上传接口。用你的 sk-syn key 鉴权,只发 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" 即可。
相关模型
对比
本页每个值都转录自厂商自己的文档(链接见上),并带有核对日期。价格在全目录范围内比较;各厂商定义不同的规格值,只说明差异而不作图表对比。此处没有任何由我们测量的数据,也不做评分。