# tts文本转语音

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/audio/speech:
    post:
      summary: tts文本转语音
      deprecated: false
      description: |
        了解如何将文本转换为音频。

        相关指南：[本转换为音频](https://platform.openai.com/docs/guides/text-to-speech)

        将输入文本转录为音频。
      tags:
        - 模型接口/音频接口（Audio）
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: 要使用的模型的 ID (tts-1, tts-1-hd)
                input:
                  type: string
                  description: 要输出的文本
                voice:
                  type: string
                  description: 语音选项不同声音ID(alloy, echo, fable, onyx, nova, shimmer)
              required:
                - input
                - voice
                - model
              x-apifox-orders:
                - model
                - input
                - voice
            example:
              model: tts-1
              input: The quick brown fox jumped over the lazy dog.
              voice: alloy
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 模型接口/音频接口（Audio）
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/2946232/apis/api-123375854-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.chatanywhere.tech
    description: 正式环境
security: []

```
