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

# 语音合成

> 兼容 OpenAI Audio Speech 的文本转语音。

**路径：** `POST https://api.omniall.ai/v1/audio/speech`

响应通常为音频二进制（`mp3` / `wav` / …），除非上游返回 JSON。

鉴权：`Authorization: Bearer sk-...`



## OpenAPI

````yaml zh-CN/openapi/minimax-speech.yaml POST /v1/audio/speech
openapi: 3.1.0
info:
  title: Omniall AI — MiniMax语音合成
  version: 1.0.0
  description: >-
    OpenAI 兼容文本转语音（经由 Omniall 调用 MiniMax TTS）。


    **路径：** `POST https://api.omniall.ai/v1/audio/speech`


    MiniMax 扩展参数放在
    `metadata`。模型示例：`speech-2.8-hd`、`speech-2.8-turbo`、`speech-2.6-hd`。


    鉴权：`Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/audio/speech:
    post:
      tags:
        - MiniMax音频
      summary: 语音合成
      description: |-
        兼容 OpenAI Audio Speech 的文本转语音。

        **路径：** `POST https://api.omniall.ai/v1/audio/speech`

        响应通常为音频二进制（`mp3` / `wav` / …），除非上游返回 JSON。

        鉴权：`Authorization: Bearer sk-...`
      operationId: minimaxCreateSpeech
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
                - voice
              properties:
                model:
                  type: string
                  description: TTS 模型 ID。
                  example: speech-2.8-hd
                input:
                  type: string
                  description: 待合成文本，可嵌入语气标签如 `(laughs)`。
                  example: 你好，欢迎使用 Omniall AI
                voice:
                  type: string
                  description: 音色 ID，如 `female-tianmei`、`English_Graceful_Lady`。
                  example: female-tianmei
                speed:
                  type: number
                  description: 语速。
                response_format:
                  type: string
                  description: 输出格式，如 `mp3`、`wav`、`flac`。
                  example: mp3
                metadata:
                  type: object
                  description: >-
                    MiniMax 扩展（`voice_setting`、`audio_setting`、`language_boost`
                    等）。
                  additionalProperties: true
            examples:
              基础合成:
                summary: 基础合成
                value:
                  model: speech-2.8-hd
                  input: 你好，欢迎使用 Omniall AI
                  voice: female-tianmei
                  response_format: mp3
              带 MiniMax metadata:
                summary: 带 MiniMax metadata
                value:
                  model: speech-2.8-hd
                  input: 欢迎使用 Omniall AI。(laughs) 我们开始吧。
                  voice: female-tianmei
                  response_format: mp3
                  metadata:
                    voice_setting:
                      voice_id: female-tianmei
                      speed: 1
                      vol: 1
                      pitch: 0
                      emotion: happy
                    audio_setting:
                      sample_rate: 32000
                      bitrate: 128000
                      format: mp3
                    language_boost: Chinese
      responses:
        '200':
          description: 音频二进制（或上游 JSON）
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
            application/json:
              schema:
                type: object

````

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