Gemini 2.5 Flash Native Audio 是 Google 的原生音訊 Live API 模型,模型頁把它描述為讓與 Gemini 2.5 Flash 之間的低延遲即時語音和影片互動成為可能:它處理連續的音訊、影片或文字流,並以即時、接近真人的語音作答,而不是串聯一個轉寫器和一個合成器。
- 輸入
- 文字 音訊 影片 $0.5/M
- 輸出
- 文字 音訊 $2/M
- 音訊輸入
- $3/M
- 音訊輸出
- $12/M
- 知識截止
- 2025-01
Benchmark 成績
gemini-2.5-flash-native-audio:公布了 8 項,但沒有一項是足夠多的其他模型也測過的,無法比較。
價格在同類中的位置
價格在 6 個同類模型中的位置
這條線顯示該模型的價格,在 Synthorai 上同類模型裡處於什麼位置。兩端標出了最便宜和最貴的那個。這裡是基礎價,批次、區域與快取寫入的折扣見價格頁。
規格與限制
Token
| 上下文視窗(廠商規格) | 131,072 |
|---|---|
| 最大輸出(廠商規格) | 8,192 |
| 知識截止 | 2025-01 |
思考
| 廠商參數 | thinkingBudget |
|---|---|
| 預設值 | 動態思考 請求未指定時生效 |
| 可關閉 | 支援 |
| 思考行為 | Live API 指南記載這個 2.5 Live 模型使用的是 token 預算而非等級:預設開啟動態思考,thinkingBudget 設為 0 可關閉。 |
| 參數 | reasoning_effort |
| 取值 | minimal · low · medium · high 具體接受哪些由廠商決定 |
音訊
| 音訊限制 |
|
|---|---|
| 串流轉寫 | 支援 |
即時語音
| 語音 | 可使用 Gemini 文字轉語音音色集中的任何音色;原生音訊輸出模型能在對話中自然切換語言。 |
|---|---|
| 工作階段能力 |
|
模型
| 模態 | 文字 + 音訊 + 影片 → 文字 + 音訊 |
|---|
- 原生音訊的 Live API 模型,端到端處理原始音訊,而不是串接 STT 與 TTS。
- Google 的模型頁列出 2025 年 1 月的知識截止,以及在 131,072 token 輸入視窗旁邊異常小的 8,192 token 輸出上限。
30 秒用上 gemini-2.5-flash-native-audio
相容 OpenAI Realtime:透過 WebSocket 連線,音訊進、音訊出。WS /v1/realtime
import asyncio, base64, json, websockets
URL = "wss://synthorai.io/v1/realtime?model=gemini-2.5-flash-native-audio"
# 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-2.5-flash-native-audio", {
// 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-2.5-flash-native-audio' <<'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-2.5-flash-native-audio", 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-2.5-flash-native-audio"), 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-2.5-flash-native-audio
- 會話執行在有狀態的 WebSocket 之上,以 16 kHz 的原始 16-bit PCM 送入,以 24 kHz 回傳;模型接受音訊、影片和文字,回傳音訊和文字。
- token 上限為輸入 131,072、輸出僅 8,192(異常地小),原生音訊模型的會話上下文視窗為 128k token;純音訊會話可持續 15 分鐘,帶影片時為 2 分鐘,除非透過會話管理延長。
- 函式呼叫、搜尋事實依據和思考受支援;快取、結構化輸出、程式碼執行和 Batch API 則不支援。
- 有兩項能力把這一代與更新的 Live 模型區分開,也是繼續留在它上面的理由:主動音訊(proactive audio),讓模型在輸入不相關時決定不作回應;以及情感對話(affective dialog),讓回覆風格隨說話者的表情和語氣調整。
- 這裡還支援非同步函式呼叫,標記為非阻塞的宣告可以讓模型在工具執行期間繼續說話。
- 音色來自 Google 的文字轉語音音色集,原生音訊輸出會在對話過程中自然切換語言,且不接受顯式的語言代碼;知識截止為 2025 年 1 月。
- Synthorai 透過其語音目錄其餘成員所用的 OpenAI 相容 /v1/realtime WebSocket 端點開放它。
常見問題
gemini-2.5-flash-native-audio API 可以免費試用嗎?
gemini-2.5-flash-native-audio 目前處於邀請制測試階段,需申請開通,而非開放註冊。請在 Synthorai 主控台提交申請,審核通過後即依標準的按用量計費方式收費,無需訂閱。
gemini-2.5-flash-native-audio 最擅長什麼?
透過 Live API 的低延遲即時語音與影片、主動音訊與情感對話,更新的 Live 模型已無、純音訊會話 15 分鐘,帶影片為兩分鐘。完整能力請見「關於」一節,內容取自廠商官方發布說明。
gemini-2.5-flash-native-audio 的價格是多少?
在 Synthorai 上,gemini-2.5-flash-native-audio 輸入 $0.5/百萬 token、輸出 $2/百萬 token,即廠商牌價,無平台加價。
如何呼叫 gemini-2.5-flash-native-audio API?
gemini-2.5-flash-native-audio 是語音對話(speech-to-speech)模型:透過 WebSocket 連線 wss://synthorai.io/v1/realtime?model=gemini-2.5-flash-native-audio,使用 OpenAI Realtime SDK(或原生 WebSocket)即可,音訊輸入、音訊輸出。它不是 POST /v1/audio/transcriptions 檔案上傳介面。以你的 sk-syn key 驗證,只送 Authorization 標頭(beta 協定已下線)。
如何開通 gemini-2.5-flash-native-audio?
gemini-2.5-flash-native-audio 處於邀請制測試階段:請在 Synthorai 主控台申請開通。審核通過後,用法與其他模型相同:把 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 設為 "gemini-2.5-flash-native-audio" 即可。
相關模型
對比
本頁每個值都轉錄自廠商自己的文件(連結見上),並帶有核對日期。價格在全目錄範圍內比較;各廠商定義不同的規格值,只說明差異而不作圖表對比。此處沒有任何由我們測量的資料,也不做評分。