🎁 新用戶 免費註冊,送 10 次呼叫,最高 $1,免綁卡。

gemini-2.5-flash-native-audio vs gemini-3.1-flash-live

vs

何時該用哪一個 — 綜合評斷,而非基準測試數據表

音訊費率完全相同(每百萬輸入 $3、輸出 $12),工作階段機制也一樣——16 kHz 輸入、24 kHz 輸出的 PCM,128k 脈絡,純音訊 15 分鐘上限——較舊的 gemini-2.5-flash-native-audio 在文字上還略便宜,每百萬 $0.5 和 $2 對 $0.75 和 $4.5。功能上的分水嶺是工具行為:gemini-2.5-flash-native-audio 支援 NON_BLOCKING 函式宣告,工具執行期間模型可以繼續說話,而 gemini-3.1-flash-live 是循序式的,要等工具結果回傳才會回應——但它在文字、音訊和視訊之外增加了影像輸入。工具密集的對話選 2.5,需要影像輸入選 3.1。

定價

gemini-2.5-flash-native-audio gemini-3.1-flash-live Δ
音訊輸入 / 1M tokens $3 $3 =
音訊輸出 / 1M tokens $12 $12 =
文字輸入 / 1M tokens $0.5 $0.75 0.67×
文字輸出 / 1M tokens $2 $4.5 0.44×

費率取自建置時的即時目錄;各模型頁面皆附有目前的費率卡。

它們的相對位置 — 在此計費單位下,所有 6 個 即時語音對語音 模型的 每 1M 語音 tokens 的價格(對數尺度)

能力

gemini-2.5-flash-native-audio gemini-3.1-flash-live
思考控制 可配置 常駐開啟
提示快取 隱式 + 顯式 隱式 + 顯式
快取生命週期 未公開 未公開
最小快取前綴 4096 個 token 4096 個 token

規格

gemini-2.5-flash-native-audio gemini-3.1-flash-live
輸入模態 文字 音訊 影片 文字 影像 音訊 影片
輸出模態 文字 音訊 文字 音訊
發布日期 2026-03-26
知識截止日期 2025-01
語音

Any voice from the Gemini text-to-speech voice set

native-audio output models switch languages naturally during a conversation.

Any voice from the Gemini text-to-speech voice set

native-audio output models switch languages naturally during a conversation.

工作階段功能
  • Function calling supported, with NON_BLOCKING function declarations letting the model keep talking while a tool runs
  • VAD interruption cancels and discards the in-flight generation
  • search grounding and thinking supported
  • no caching, structured outputs, code execution or Batch API
  • Function calling is sequential only — the model will not start responding until the tool response is sent
  • search grounding and thinking supported
  • VAD interruption cancels the in-flight generation
  • no caching, structured outputs, code execution or Batch API
上下文視窗 131K 131K

規格摘錄自各供應商的文件;供應商未發布的資料列會直接省略,而非自行推測。 完整來源: gemini-2.5-flash-native-audio · gemini-3.1-flash-live

只需一行程式碼即可在兩者間切換

以下每個頁籤中都有這兩個 ID — 醒目提示的這兩行是唯一的修改處。相同的端點,相同的金鑰,相同的請求結構。

import asyncio, base64, json, websockets

URL = "wss://synthorai.io/v1/realtime?model=gemini-2.5-flash-native-audio"
# 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())

取得 API 金鑰 →

常見問題

gemini-2.5-flash-native-audio 和 gemini-3.1-flash-live 哪個比較便宜?

兩者列出的 音訊輸入 / 1m tokens 相同($3),因此價格無法決定勝負 — 請參閱下方的規格與功能。

我可以在不進行兩次整合的情況下,對 gemini-2.5-flash-native-audio 和 gemini-3.1-flash-live 進行 A/B 測試嗎?

可以。兩者皆透過同一個相容 OpenAI 的端點提供服務,並使用同一把 API 金鑰 — 切換只需更改一行的模型字串,因此您可以將部分流量分別導向兩者並直接比較帳單。

gemini-2.5-flash-native-audio 與 gemini-3.1-flash-live 支援提示快取嗎?

我們的資料來源中僅列出兩者其中之一的快取讀取定價;若缺少某項費率,表示該供應商未對快取讀取單獨計費。

相關比較