取得 API 金鑰

Google 出品

富有表現力的語音,能演出 [laughing] 這類提示

google/gemini-3.8-flash-tts/text-to-speech0.05 點數起/秒 · US$0.0005
  • 30 種聲音
  • 文字轉語音
查看範例

關於 Gemini 3.8 Flash TTS

Gemini 3.8 Flash TTS 是 Google 最新的語音合成模型:貼入文稿,從 30 種音色裡選一個,就能拿到乾淨的 WAV 檔案。表演直接寫在文稿裡,用 [whispering]、[sighs]、[laughing] 這樣的提示控制,一次請求裡還能讓兩個聲音對話。

在 POST /jobs/createTask 把模型名稱填成 google/gemini-3.8-flash-tts/text-to-speech 就能呼叫,0.05 點數/秒起(US$0.0005)。新帳戶送 30 點數,可以先在 Playground 免費試用。

這份指南目前只有英文版。 →

請求參數

參數必填說明
pace否Rhythm of the reading. Omit it to keep the voice's own rhythm. natural · rapid_fire · the_drift · staccato
text否The words to be spoken, exactly as written. Direction such as [whispering] or [sighs] goes into the text itself.
scene否Where and to whom the words are spoken. Shapes the delivery and is not spoken.
style否預設的風格或曲風。 whisper · empathetic · vocal_smile · newscaster · promo_hype · deadpan
accent否English accent used for the reading. neutral · american_general · american_valley · american_south · british_rp · british_brixton · transatlantic · australian
dialogue否A scripted conversation, used instead of text: each line names a speaker from speakers.
speakers否The cast for dialogue: one or two voices, each with a name the lines refer to.
voice_id否從可用的聲音中挑一個。 Achernar · Achird · Algenib · Algieba · Alnilam · Aoede · Autonoe · Callirrhoe · Charon · Despina · Enceladus · Erinome · Fenrir · Gacrux · Iapetus · Kore · Laomedeia · Leda · Orus · Puck · Pulcherrima · Rasalgethi · Sadachbia · Sadaltager · Schedar · Sulafat · Umbriel · Vindemiatrix · Zephyr · Zubenelgenubi · 預設值: Kore
temperature否Variation between takes; higher is less predictable. ≥ 0 · ≤ 2
instructions否How to read the text: mood, distance from the microphone, who is listening. Shapes the delivery and is not spoken.

價格

價格以點數計,和網站上用的是同一種點數(1 點 = $0.01)。任務受理時先凍結點數,完成後依實際費用結算;失敗的任務會退還。

選項點數 /秒≈ 美元
標準0.05US$0.0005

想在執行前知道確切金額,把相同的請求內容送到 POST /jobs/quote 即可。

API 快速上手

三步驟呼叫 Gemini 3.8 Flash TTS API

  1. 建立 API 金鑰. 登入 PopNow,在 API 主控台建立金鑰。金鑰以 sk-popnow- 開頭,和網站共用同一份點數。
  2. 送出請求. 對 POST /jobs/createTask 送出請求,model 填 google/gemini-3.8-flash-tts/text-to-speech,input 依照參數表填寫。回應會立即傳回任務 ID。
  3. 取得結果. 用任務 ID 輪詢 GET /jobs/recordInfo,或帶上 callBackUrl,結果會推送到該網址。任務成功後下載輸出連結。
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "google/gemini-3.8-flash-tts/text-to-speech",
  "input": {
    "text": "Welcome back. Your files finished rendering a minute ago and are ready to download.",
    "voice_id": "Kore"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

請把提示詞和連結換成你自己的。API 頁籤裡有回應、輪詢和回呼的參考。

Gemini 3.8 Flash TTS API 常見問題

Gemini 3.8 Flash TTS API 怎麼收費?

Gemini 3.8 Flash TTS:0.05 點數(US$0.0005)/秒。點數和網站通用(1 點數 = $0.01),新帳號贈送 30 點數,失敗的任務會退還。

Gemini 3.8 Flash TTS 在 API 裡的模型名稱是什麼?

在 POST /jobs/createTask 的 model 欄位填 文字轉語音用 google/gemini-3.8-flash-tts/text-to-speech。

Gemini 3.8 Flash TTS API 有哪些限制?

文字長度(字元):5,000;聲音:30。超出這些限制的請求會在扣款之前被拒絕。

不寫程式能試 Gemini 3.8 Flash TTS 嗎?

可以。Playground 用你的 PopNow 點數執行 Gemini 3.8 Flash TTS,不需要 API 金鑰,每次執行都會附上對應的程式碼。

所有 Gemini 模型

Gemini 3.8 Flash Lite TTS 音色相同、價格更低,適合草稿和大批次。完整版 Flash 的表現力更強。

更多 Gemini 3.8 Flash TTS 相關內容