> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini 3.8 Flash Lite TTS

> Gemini 3.8 Flash-Lite TTS API 以单人或双人对话形式大批量生成 WAV 语音，提供 30 种预设音色，并支持风格指示。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口获取结果。

Gemini 3.8 Flash-Lite TTS 是 Google 面向高吞吐场景的文本转语音（TTS）模型。它把文本或两位说话人的对话脚本转为 WAV 音频，提供 30 种预设音色，自动识别语言（Google 列出 101 种），并接受自然语言的风格指示。适合朗读功能、通知播报、语音 Agent 提示音等大批量的日常语音。

Gemini 3.8 Flash-Lite TTS 的请求字段与 [Gemini 3.8 Flash TTS](https://docs.vidgo.ai/zh/api-manual/music-series/google-gemini-3-8-flash-text-to-speech.md) 相同，后者被 Google 定位为追求最高音色保真度和复杂对话。只需修改 `model` 即可切换。

## 模型

* **google/gemini-3.8-flash-lite/text-to-speech** — Gemini 3.8 Flash-Lite 文本转语音，适合大批量单人或双人语音。

## 功能

* 文本转语音（TTS），支持单人朗读或双人对话脚本。
* 30 种预设音色，可按请求或按说话人设置。
* 用自然语言的 `style_instructions` 控制语气、语速、口音和情绪，可全局设置，也可逐句设置。
* 自动识别语言（Google 列出 101 种语言）。
* 输出 WAV 音频。

## 输入模式

* **单人**：发送 `text`，可选 `voice`（默认 `Kore`）。
* **双人对话**：发送恰好两位 `speakers` 和一组 `turns`。此模式下不要发送顶层的 `text` 或 `voice`。

## 必填参数

单人：

* `text`（string）：要朗读的文本，不能为空白。

双人对话：

* `speakers`（object\[]）：恰好两个对象，每个对象只包含：
  * `speaker_id`（string）：非空别名，在请求内不能重复，例如 `host`。
  * `voice`（string）：[预设音色](#预设音色)之一。
* `turns`（object\[]）：至少一句，按说话顺序排列：
  * `speaker_id`（string）：必须与两位 `speakers` 之一一致。
  * `text`（string）：该说话人说的内容，不能为空白。
  * `style_instructions`（string，可选）：仅作用于这一句的演绎指示。

## 可选参数

* `voice`（string）：仅单人模式。[预设音色](#预设音色)之一。默认 `Kore`。
* `style_instructions`（string）：作用于整个请求的全局演绎指示，例如 `Calm, warm documentary narration`。两种模式都适用。
* `enable_safety_checker`（boolean）：启用上游安全检查。默认 `true`。

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)和回调内容的 `files` 数组中会返回一个 WAV 音频文件。输出格式固定，没有 `output_format` 字段。

## 预设音色

`voice` 和 `speakers[].voice` 可用以下 30 个值（区分大小写）：

> [accordion] 支持的音色取值
>
> * `Achernar`
> * `Achird`
> * `Algenib`
> * `Algieba`
> * `Alnilam`
> * `Aoede`
> * `Autonoe`
> * `Callirrhoe`
> * `Charon`
> * `Despina`
> * `Enceladus`
> * `Erinome`
> * `Fenrir`
> * `Gacrux`
> * `Iapetus`
> * `Kore`
> * `Laomedeia`
> * `Leda`
> * `Orus`
> * `Pulcherrima`
> * `Puck`
> * `Rasalgethi`
> * `Sadachbia`
> * `Sadaltager`
> * `Schedar`
> * `Sulafat`
> * `Umbriel`
> * `Vindemiatrix`
> * `Zephyr`
> * `Zubenelgenubi`

## 示例

* **单人朗读**：用 `voice: Puck` 朗读一段消息摘要。
* **双人客服对话**：`agent`（`Kore`）与 `caller`（`Charon`），配合全局 `style_instructions`，并提供 `callback_url`。

## 注意事项

* 积分在提交时预扣，按计费字符数计算：`text`、全局 `style_instructions`，以及每一句的 `text` 和 `style_instructions`。说话人 ID 不计入。任务失败会全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。
* Flash-Lite 的计费低于 [Gemini 3.8 Flash TTS](https://docs.vidgo.ai/zh/api-manual/music-series/google-gemini-3-8-flash-text-to-speech.md)。
* 对话模式只支持恰好两位说话人。出现第三位说话人、`turns` 中的 `speaker_id` 不在 `speakers` 里，或对话请求中带有顶层 `text`/`voice`，都会返回 400。
* 演绎指示请写在 `style_instructions` 中，不要写进 `text`；写在 `text` 里的指示可能会被读出来。
* 本接口不支持 `output_format`、`language_code`、`temperature`、`seed` 和时间戳，也不支持声音克隆或自定义音色。


## OpenAPI

````yaml zh/api-manual/music-series/google-gemini-3-8-flash-lite-text-to-speech.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Gemini 3.8 Flash Lite TTS
  description: Gemini 3.8 Flash-Lite TTS API 以单人或双人对话形式大批量生成 WAV 语音，提供 30 种预设音色，并支持风格指示。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Audio Series
      summary: Gemini 3.8 Flash Lite TTS
      description: >-
        单人模式发送 `text`（可选 `voice`），双人对话发送 `speakers` + `turns`；对话请求不能包含顶层的 `text`
        或 `voice`。未列出的字段（如 `output_format`、`language_code`、`temperature`）都会返回
        400。
      operationId: submit_google_gemini_3_8_flash_lite_text_to_speech
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: 模型 ID，填 `google/gemini-3.8-flash-lite/text-to-speech`。
                  example: google/gemini-3.8-flash-lite/text-to-speech
                callback_url:
                  type: string
                  format: uri
                  nullable: true
                  description: >-
                    可选的公开 HTTP(S) 地址，任务变为 `finished` 或 `failed` 时会收到 POST
                    请求。建议使用 HTTPS。省略、传 `null` 或空字符串即不发送回调。
                  example: https://your-domain.com/callback
                input:
                  type: object
                  properties:
                    text:
                      type: string
                      minLength: 1
                      example: Welcome to the city museum. The east wing opens at ten.
                      description: 单人模式：要朗读的文本。单人模式必填，不能为空白。对话模式下不能传。
                    voice:
                      type: string
                      enum:
                        - Achernar
                        - Achird
                        - Algenib
                        - Algieba
                        - Alnilam
                        - Aoede
                        - Autonoe
                        - Callirrhoe
                        - Charon
                        - Despina
                        - Enceladus
                        - Erinome
                        - Fenrir
                        - Gacrux
                        - Iapetus
                        - Kore
                        - Laomedeia
                        - Leda
                        - Orus
                        - Pulcherrima
                        - Puck
                        - Rasalgethi
                        - Sadachbia
                        - Sadaltager
                        - Schedar
                        - Sulafat
                        - Umbriel
                        - Vindemiatrix
                        - Zephyr
                        - Zubenelgenubi
                      default: Kore
                      description: 单人模式：预设音色。对话模式下不能传。
                    speakers:
                      type: array
                      items:
                        type: object
                        required:
                          - speaker_id
                          - voice
                        properties:
                          speaker_id:
                            type: string
                            minLength: 1
                            example: host
                            description: 供 `turns` 引用的说话人别名，不能为空且不能重复。
                          voice:
                            type: string
                            enum:
                              - Achernar
                              - Achird
                              - Algenib
                              - Algieba
                              - Alnilam
                              - Aoede
                              - Autonoe
                              - Callirrhoe
                              - Charon
                              - Despina
                              - Enceladus
                              - Erinome
                              - Fenrir
                              - Gacrux
                              - Iapetus
                              - Kore
                              - Laomedeia
                              - Leda
                              - Orus
                              - Pulcherrima
                              - Puck
                              - Rasalgethi
                              - Sadachbia
                              - Sadaltager
                              - Schedar
                              - Sulafat
                              - Umbriel
                              - Vindemiatrix
                              - Zephyr
                              - Zubenelgenubi
                            description: 该说话人的预设音色。
                        additionalProperties: false
                        description: 一位说话人。
                      minItems: 2
                      maxItems: 2
                      description: 对话模式：恰好两位说话人。每个对象只包含 `speaker_id` 和 `voice`。
                    turns:
                      type: array
                      items:
                        type: object
                        required:
                          - speaker_id
                          - text
                        properties:
                          speaker_id:
                            type: string
                            example: host
                            description: 必须与 `speakers` 中的某个 `speaker_id` 一致。
                          text:
                            type: string
                            minLength: 1
                            description: 该说话人说的内容，不能为空白。
                          style_instructions:
                            type: string
                            description: 可选，仅作用于这一句的演绎指示，例如 `laughing`、`whispering`。
                        additionalProperties: false
                        description: 一句台词。
                      minItems: 1
                      description: 对话模式：按说话顺序排列的台词，至少一条。
                    style_instructions:
                      type: string
                      description: >-
                        可选的全局演绎指示，控制语气、语速、口音或情绪，例如 `Calm, warm documentary
                        narration`。两种模式都适用。
                    enable_safety_checker:
                      type: boolean
                      default: true
                      description: 启用上游安全检查。
                  additionalProperties: false
                  description: 生成参数。发送 `text`（单人）或 `speakers` + `turns`（双人对话），二者只能选其一。
            examples:
              single_speaker:
                summary: 单人朗读
                value:
                  model: google/gemini-3.8-flash-lite/text-to-speech
                  input:
                    text: >-
                      You have three new messages. The first is from Dana:
                      running ten minutes late, save me a seat.
                    voice: Puck
              dialogue:
                summary: 双人客服对话
                value:
                  model: google/gemini-3.8-flash-lite/text-to-speech
                  callback_url: https://your-domain.com/callback
                  input:
                    speakers:
                      - speaker_id: agent
                        voice: Kore
                      - speaker_id: caller
                        voice: Charon
                    turns:
                      - speaker_id: caller
                        text: Hi, my router keeps dropping the connection.
                      - speaker_id: agent
                        text: >-
                          Sorry about that. Let's restart it together, it only
                          takes a minute.
                    style_instructions: Friendly, clear customer-support tone
      responses:
        '200':
          description: 任务已提交
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                    description: HTTP 状态码。
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                        description: >-
                          任务
                          ID，用于[查询任务状态](/zh/api-manual/task-management/status)。
                      status:
                        type: string
                        enum:
                          - not_started
                        description: 任务的初始状态。
                      created_time:
                        type: string
                        format: date-time
                        description: 任务创建时间（ISO 8601）。
              example:
                code: 200
                data:
                  task_id: task-unified-1762160000-abc123
                  status: not_started
                  created_time: '2026-11-03T10:30:00'
        '400':
          description: 输入无效、字段不受支持、媒体无法访问或积分不足
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '401':
          description: 凭证无效
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '403':
          description: 拒绝访问
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '404':
          description: 模型未知或已停用
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '408':
          description: 请求超时
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: JSON 无效或请求体不是对象
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '429':
          description: 超出速率限制或 API Key 积分限额
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '500':
          description: 内部错误
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '502':
          description: 无法创建上游生成任务
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '503':
          description: 所请求的模型暂时不可用
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证


        获取 API Key：


        进入 **仪表盘 → API 密钥**（[API Key
        管理页面](https://vidgo.ai/apis/dashboard/api-key)）获取你的 API Key


        在请求头中添加：


        ```

        Authorization: Bearer VIDGO_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.