跳至內容

Gemini 3.8 Flash TTS

整合

模型 id google/gemini-3.8-flash-tts
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/google/gemini-3.8-flash-tts?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Hello from Doitong. This is a short test sentence."
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此請求: ≈$0.045 45 API 點數 · ≈ ₽4.84 在此頁面執行

取得 API 金鑰
Google 文字轉語音 快速 #text-to-speech#audio#dialogue#voiceover

標準 Gemini 3.8 Flash 文字轉語音,適用於旁白或雙說話者對話,支援 30 種語音

Google · 音訊

您的第一個結果會顯示在這裡

在下方建立請求,並使用您的 API 金鑰執行。輸出會複製到我們的儲存空間,可永久保留或免費保留 7 天。

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

單一說話者要逐字朗讀的文字;對話請使用 speakers 和 turns,並省略 提示詞。使用 style_instructions 指定語音表現方式,並在文字中以 <laugh> 或 <sigh> 標記發聲事件。供應商限制完整輸入不得超過 8,192 Token。

進階 style_instructions · voice · enable_safety_checker · speakers · turns

每一輪的預設表達指引,可被覆寫;這些指示不屬於口述逐字稿。

預設 Kore

單一說話者語音使用的預設聲音。

對話說話者設定,恰好包含兩個不同別名,各自搭配預建聲音。

對話輪次序列,每一輪都識別已設定的說話者。

POST /run/google/gemini-3.8-flash-tts?wait=20 報價 → $0.045
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/google/gemini-3.8-flash-tts?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Hello from Doitong. This is a short test sentence."
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

您的金鑰會保留在此瀏覽器中:只會傳送至 Doitong API,且只有在勾選「記住」時才會儲存至 localStorage。 取得 API 金鑰

關於 Gemini 3.8 Flash TTS

使用 30 種預建語音之一,根據 `prompt` 建立 WAV 音訊;也可使用兩個 `speakers` 和 `turns` 清單生成對話。`style_instructions` 可獨立於逐字稿設定語氣,也能套用至所有輪次。允許 <laugh> 和 <sigh> 等內嵌聲音事件。

參數

名稱類型 預設值允許值 說明
prompt選填
類型string | null
單一說話者要逐字朗讀的文字;對話請使用 speakers 和 turns,並省略 提示詞。使用 style_instructions 指定語音表現方式,並在文字中以 <laugh> 或 <sigh> 標記發聲事件。供應商限制完整輸入不得超過 8,192 Token。
style_instructions選填
類型string | null
每一輪的預設表達指引,可被覆寫;這些指示不屬於口述逐字稿。
voice選填
類型enum
預設值Kore
AchernarAchirdAlgenibAlgiebaAlnilamAoedeAutonoeCallirrhoeCharonDespinaEnceladusErinomeFenrirGacruxIapetusKore
另有 14 個LaomedeiaLedaOrusPulcherrimaPuckRasalgethiSadachbiaSadaltagerSchedarSulafatUmbrielVindemiatrixZephyrZubenelgenubi
單一說話者語音使用的預設聲音。
speakers選填
類型object[]
≤ 2 個項目≥ 2 個項目
對話說話者設定,恰好包含兩個不同別名,各自搭配預建聲音。
speakers[].speaker_id必填
類型string
≥ 1 characters
識別每一輪中說話者的別名。
speakers[].voice必填
類型enum
AchernarAchirdAlgenibAlgiebaAlnilamAoedeAutonoeCallirrhoeCharonDespinaEnceladusErinomeFenrirGacruxIapetusKore
另有 14 個LaomedeiaLedaOrusPulcherrimaPuckRasalgethiSadachbiaSadaltagerSchedarSulafatUmbrielVindemiatrixZephyrZubenelgenubi
指定給此說話者的預設聲音。
turns選填
類型object[]
對話輪次序列,每一輪都識別已設定的說話者。
turns[].speaker_id必填
類型string
≥ 1 characters
識別設定中說話者的別名。
turns[].text必填
類型string
≥ 1 characters
此輪要朗讀的確切逐字稿。
turns[].style_instructions選填
類型string | null
此輪可選的語音表達風格。
enable_safety_checker選填
類型boolean
預設值true
在呼叫端獲得授權的情況下,將此值設為 false 可放寬審核。
必填

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "google/gemini-3.8-flash-tts",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 45,
    "usd": "0.045",
    "charged": 45,
    "refunded": 0
  },
  "input": {
    "prompt": "Hello from Doitong. This is a short test sentence."
  },
  "output": {
    "audio": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_name": "0-output.mp3",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
audio
object {url, content_type, file_name, file_size}WAV 格式的音訊輸出。

更多模型:文字轉語音

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/google/gemini-3.8-flash-tts.md. 所有模型與指南: https://doitong.com/developers/llms.txt