最后更新:
Gemini 3.8 Flash TTS:价格、音色和 API 教程
Google 在 2026 年 9 月 23 日发布 Gemini 3.8 Flash TTS 和 Gemini 3.8 Flash-Lite TTS。Flash TTS 表现力更强,适合旁白、有声书和角色配音;Flash-Lite TTS 更便宜,适合配音翻译和语音客服。本页讲清每小时成本、音色、代码和上手前要知道的限制。
Gemini 3.8 Flash TTS 基本参数
| 项目 | Gemini 3.8 Flash TTS |
|---|---|
| 发布时间 | 2026 年 9 月 23 日 |
| 模型 ID | gemini-3.8-flash-tts、gemini-3.8-flash-lite-tts |
| 输入 / 输出 | 输入文本,输出音频(默认 WAV,也可选 PCM、mu-law、A-law) |
| token 上限 | 输入 8,192,输出 16,384(约 10.9 分钟音频) |
| 语言 | 130+,自动识别语言(Google 博客写的是 100+) |
| 音色 | 30 个预置音色、2,000+ 个音色库,还可以自己设计或复刻 |
| 单次请求说话人数 | 使用预置音色时最多两人 |
| Batch、Flex、Priority | 支持 |
来源: Google TTS 发布博客
Gemini 3.8 Flash TTS 价格
音频输出按每秒 25 个 token 计费,所以每小时成本很好算。首发价到 2026 年 12 月 31 日,2027 年 1 月 1 日起恢复标准价。
| 文本输入 / 百万 | 音频输出 / 百万 | 每小时音频(2026) | 每小时(2027) | |
|---|---|---|---|---|
| Flash TTS | $0.50 | $9 | $0.81 | $1.62 |
| Flash-Lite TTS | $0.50 | $6 | $0.54 | $1.08 |
| Flash TTS,Batch 或 Flex | $0.25 | $4.50 | $0.41 | - |
| Flash-Lite TTS,Batch 或 Flex | $0.25 | $3 | $0.27 | - |
每小时成本是我们按 Google 每 token 价格算出来的,不含很少的文本输入费用。两个模型都有免费层;免费层的输入可能被用来改进 Google 产品。
来源: Gemini API 价格页
Python 示例
- 在 Google AI Studio 创建密钥,保存为 GEMINI_API_KEY。
- pip install -U google-genai。
- 要念的文字放在 text 里,语气、语速、情绪写在 style 注释里,不要写进 text。
- 选一个音色,把 base64 音频写入 .wav 文件。
# pip install -U google-genai
import base64
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-3.8-flash-tts",
input=[{
"type": "user_input",
"content": [{
"type": "text",
"text": "Have a wonderful day! <short pause> See you tomorrow.",
"annotations": [{"type": "speech_metadata", "style": "cheerful and friendly"}],
}],
}],
response_format={"type": "audio"},
generation_config={"speech_config": [{"voice": "Kore"}]},
)
with open("out.wav", "wb") as f:
f.write(base64.b64decode(interaction.output_audio.data))来源: 语音生成文档
curl 示例
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.8-flash-tts",
"input": [{
"type": "user_input",
"content": [{
"type": "text",
"text": "Have a wonderful day!",
"annotations": [{ "type": "speech_metadata", "style": "cheerful and friendly" }]
}]
}],
"response_format": { "type": "audio" },
"generation_config": { "speech_config": [{ "voice": "Kore" }] }
}' | jq -r '[.steps[] | select(.type=="model_output") | .content[] | select(.type=="audio")] | last | .data' \
| base64 --decode > out.wav来源: 语音生成文档
双人对话和行内提示
在 speech_config 里给每个说话人指定一次音色,然后每段话标上说话人和可选的 style。短暂的声音直接写在文本里:<laughs>、<sigh>、<gasp>、<short pause>,以及 |mhm|、|yeah| 这类附和声。
# Two speakers in one request (the most a request allows with prebuilt voices)
generation_config={"speech_config": {"speakers": [
{"speaker": "Host", "voice": "Kore"},
{"speaker": "Guest", "voice": "Puck"},
]}}
input=[{"type": "user_input", "content": [
{"type": "text", "text": "Welcome back to the show. <laughs> Big week.",
"annotations": [{"type": "speech_metadata", "speaker": "Host", "style": "warm, upbeat"}]},
{"type": "text", "text": "|mhm| It really was.",
"annotations": [{"type": "speech_metadata", "speaker": "Guest", "style": "relaxed"}]},
]}]text 会被逐字朗读,写在文本里的舞台说明可能被念出来,请放在 style 里。
来源: 语音生成文档
来源: Google TTS 发布博客
音色、音色设计和声音克隆
- 30 个预置音色(如 Kore、Puck、Zephyr、Charon),另有 2,000+ 个可直接商用的扩展音色,覆盖墨西哥西语、魁北克法语、苏格兰英语等地区口音。
- 音色设计:用自然语言描述角色、口音和性格,生成后可保存复用。
- 声音复刻:用约 30 秒样本克隆声音,内置同意验证、SynthID 水印和 C2PA 凭证。
- AI Studio 中的声音复刻不对伊利诺伊州、得克萨斯州、欧洲经济区、英国、瑞士和印度开放。
来源: Google TTS 发布博客
效果怎么样?
Google 引用了 Hume AI 的音色设计基准:Flash TTS 综合第一,得分 71.4,口音建模 60.8;在 Hume 的综合质量指数上 Flash 第一、Flash-Lite 第二。在 Voice Arena 盲测中,两个模型在日语、巴西葡萄牙语、越南语、阿拉伯语、墨西哥西语和印地语上都排在前列。这些是厂商引用的结果,选型前请用自己的稿子试听。
来源: Google TTS 发布博客
选 Flash TTS 还是 Flash-Lite TTS?
- Flash TTS. 有声书、播客、广告和游戏角色,表现力比价格更重要的场景。
- Flash-Lite TTS. 语音客服、配音翻译和大批量通知,每小时便宜约三分之一。
- 都不合适. 实时双向语音对话:请用 Google 的 Live API 模型,TTS 模型不支持。
Gemini 3.8 Flash API 教程 · 所有模型价格
来源: Google TTS 发布博客
常见问题
Gemini 3.8 Flash TTS 多少钱?
2026 年 12 月 31 日前每百万文本 token $0.50、每百万音频 token $9,约合每小时音频 $0.81。2027 年起翻倍,约每小时 $1.62。
Gemini 3.8 Flash TTS 免费吗?
可以在 Google AI Studio 用 Gemini API 免费层免费调用,有速率限制。免费层数据可能被用来改进 Google 产品。
模型 ID 是什么?
gemini-3.8-flash-tts;更便宜的 Flash-Lite 版本是 gemini-3.8-flash-lite-tts。
一次请求能生成多长的音频?
输出上限 16,384 token,按每秒 25 token 算约 10.9 分钟。更长的稿子请按章节拆分。
能克隆我自己的声音吗?
可以,用约 30 秒的样本,内置同意验证。AI Studio 在伊利诺伊州、得克萨斯州、欧洲经济区、英国、瑞士和印度不提供这项功能。
支持多少种语言?
模型页列出 130+ 种语言,可自动识别。
独立站点,与 Google、Anthropic 无关联。价格和跑分会变,做预算前请以链接的官方页面为准。