---
title: AI 音频与语音 API | RunAPI
description: 通过一个公开音频 API 使用文本转语音、声音克隆、转写和音效能力。
url: https://runapi.ai/zh-CN/audio.md
canonical: https://runapi.ai/zh-CN/audio
locale: zh-CN
site: RunAPI
image: https://runapi.ai/assets/opengraph-bfaaa0f0.png
alternates:
  en: https://runapi.ai/audio
  zh-CN: https://runapi.ai/zh-CN/audio
  es: https://runapi.ai/es/audio
  ja: https://runapi.ai/ja/audio
  de: https://runapi.ai/de/audio
  fr: https://runapi.ai/fr/audio
  pt-BR: https://runapi.ai/pt-BR/audio
  ko: https://runapi.ai/ko/audio
  it: https://runapi.ai/it/audio
  nl: https://runapi.ai/nl/audio
  pl: https://runapi.ai/pl/audio
  tr: https://runapi.ai/tr/audio
  zh-TW: https://runapi.ai/zh-TW/audio
  zh-HK: https://runapi.ai/zh-HK/audio
  ar: https://runapi.ai/ar/audio
  x-default: https://runapi.ai/audio
---

> HTML version: https://runapi.ai/zh-CN/audio
> Site index for agents: https://runapi.ai/llms.txt


# AI 音频与语音 API

通过一个公开音频 API 使用文本转语音、声音克隆、转写和音效能力。

- [获取 API 密钥](https://runapi.ai/zh-CN/login)
- [浏览模型](https://runapi.ai/zh-CN/models.md)

32 个音频模型 · 6 提供商 · 89 公开端点

## 在线试用

从这里开始下一次音频生成。选择公开模型，查看当前价格和端点详情。

| 模型 | 提供商 | 模态 | 价格 |
| --- | --- | --- | --- |
| [ElevenLabs/audio-isolation](https://runapi.ai/zh-CN/models/elevenlabs/audio-isolation.md) | ElevenLabs | Audio & Music | $0.12 / minute |
| [Fish Audio](https://runapi.ai/zh-CN/models/fish-audio.md) | Fish Audio | Audio & Music | Free / track |
| [Gemini Omni/gemini-omni-audio](https://runapi.ai/zh-CN/models/gemini-omni/audio.md) | Google | Audio & Music | Free / track |

模式: `text_to_speech`

## 快速开始

### 合成语音

#### curl

```bash
curl https://runapi.ai/api/v1/elevenlabs/text_to_speech \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"text-to-speech-multilingual-v2","text":"Welcome to RunAPI.","voice":"Adam","language_code":"en"}'
```

#### Python

```python
import json
import os
import requests

response = requests.post(
    "https://runapi.ai/api/v1/elevenlabs/text_to_speech",
    headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
    json=json.loads("{\"model\":\"text-to-speech-multilingual-v2\",\"text\":\"Welcome to RunAPI.\",\"voice\":\"Adam\",\"language_code\":\"en\"}")
)
response.raise_for_status()
print(response.json())
```

#### Node.js

```javascript
const response = await fetch("https://runapi.ai/api/v1/elevenlabs/text_to_speech", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.RUNAPI_API_KEY,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({"model":"text-to-speech-multilingual-v2","text":"Welcome to RunAPI.","voice":"Adam","language_code":"en"})
});
console.log(await response.json());
```

#### Go

```go
package main

import (
    "io"
    "net/http"
    "os"
    "strings"
)

func main() {
    payload := strings.NewReader("{\"model\":\"text-to-speech-multilingual-v2\",\"text\":\"Welcome to RunAPI.\",\"voice\":\"Adam\",\"language_code\":\"en\"}")
    request, err := http.NewRequest("POST", "https://runapi.ai/api/v1/elevenlabs/text_to_speech", payload)
    if err != nil { panic(err) }
    request.Header.Set("Authorization", "Bearer "+os.Getenv("RUNAPI_API_KEY"))
    request.Header.Set("Content-Type", "application/json")
    response, err := http.DefaultClient.Do(request)
    if err != nil { panic(err) }
    defer response.Body.Close()
    io.Copy(os.Stdout, response.Body)
}
```

#### 响应

```json
{
  "id": "tsk_example",
  "status": "processing"
}
```


## 生成首个音频的四个步骤

**使用方式**

1. **获取 API 密钥** - 一个密钥即可使用所有 TTS 和声音模型。
2. **选择声音** - 浏览受支持音频模型中的可用声音。
3. **发送文本** - 将文本和声音选择发送到 /api/v1/elevenlabs/text_to_speech。
4. **获取音频** - 从任务结果中接收生成的音频。



### 探索

## 更多 AI API

- [视频 API](https://runapi.ai/zh-CN/models?modality=video) - 使用 80 个模型生成、编辑和放大视频 [了解更多](https://runapi.ai/zh-CN/models?modality=video)
- [图像 API](https://runapi.ai/zh-CN/models?modality=image) - 使用 49 个模型创建和转换图像 [了解更多](https://runapi.ai/zh-CN/models?modality=image)
- [音乐 API](https://runapi.ai/zh-CN/music) - 使用 AI 创作原创曲目 [了解更多](https://runapi.ai/zh-CN/music)
- [LLM API](https://runapi.ai/zh-CN/models?modality=text) - 使用 66 个语言模型进行聊天补全 [了解更多](https://runapi.ai/zh-CN/models?modality=text)


## 团队用它构建的内容

- **语音代理**: 将流式 TTS 与 LLM 和转写结合，用一个密钥构建全双工语音循环。
- **本地化**: 用辨识度稳定的克隆声音，将现有视频配音为新的语言。
- **会议记录**: 使用说话人标签进行转写，再通过同一流程中的 LLM 端点生成摘要。
- **无障碍**: 无需录音，为文章、文档和应用内内容添加旁白。


## RunAPI 与替代方案

| 功能 | RunAPI | 直接使用 ElevenLabs | OpenAI TTS |
| --- | --- | --- | --- |
| 声音模型 | 32 个音频模型 | 1 个提供商 | 6 个声音 |
| 价格 | 低至 $0.12 / minute | 官方价格 | 官方价格 |
| 实时流式传输 | 支持 | 支持 | 不支持 |
| 统一计费 | 支持 | 不支持 | 不支持 |
| MCP 服务器 | 支持 | 不支持 | 不支持 |
| 提供商故障切换 | 支持 | 不支持 | 不支持 |



## Everything the audio endpoint can do

- **Text to Speech** - Stream natural speech from text with per-request voice and speed control.
- **Voice Cloning** - Build a reusable voice from a short reference sample, then call it by id like any other voice.
- **Speech to Text** - Transcribe long-form audio with timestamps, speaker labels, and word-level confidence.
- **Text to Sound** - Generate foley and sound effects from a description — impacts, ambience, UI cues.
- **Text to Dialogue** - Render multi-speaker conversations with distinct voices and natural turn timing in one call.

## Audio models on one key

| 模型 | 提供商 | 价格 |
| --- | --- | --- |
| ElevenLabs/audio-isolation | ElevenLabs | $0.12 / minute |
| ElevenLabs/sound-effect-v2 | ElevenLabs | $0.15 / minute |
| ElevenLabs/speech-to-text | ElevenLabs | $0.04 / minute |
| ElevenLabs/text-to-dialogue-v3 | ElevenLabs | $0.14 / 1K chars |
| ElevenLabs/text-to-speech-multilingual-v2 | ElevenLabs | $0.12 / 1K chars |
| ElevenLabs/text-to-speech-turbo-v2.5 | ElevenLabs | $0.06 / 1K chars |

[View all 32 audio models](https://runapi.ai/zh-CN/models?modality=audio_music.md)

## 开发者选择 RunAPI 的理由

- **一个密钥，全部模型** - 无需再管理多组 API 密钥。一次集成即可访问所有提供商的 200 多个模型。
- **节省 15-25% 成本** - 我们与提供商的批量协议带来低于直接采购的价格，且不额外加价。
- **自动故障切换** - 提供商发生故障时，我们会将请求路由到下一个最佳选项，让你的应用持续运行。
- **兼容 OpenAI** - 可直接替换 OpenAI SDK。只需修改一行代码即可访问任意模型。
- **实时计费** - 只为实际使用付费。按请求计价、没有最低消费，并可按模型和项目追踪成本。
- **API Key 身份验证** - 使用你的 RunAPI API key 验证音频 API 请求。

## Audio API 常见问题

### TTS 如何计费？

按输入文本每 1,000 个字符以模型单价计费。转录按音频分钟数计费。
### 我可以克隆声音吗？

可以。上传参考音频样本以创建 voice id，之后的请求中传入该 id 即可。
### 支持流式输出吗？

是否支持流式输出取决于所选端点。集成播放功能前，请查看文档中的响应格式。
### 支持哪些语言？

支持的语言因模型而异，请查看所选模型文档中的语言说明。
### 你们会保存音频或声音样本吗？

请求和响应内容可能会被保留。数据处理详情请参阅隐私政策。
### 能获取词级时间戳吗？

时间戳支持情况及粒度取决于所选转写端点，请查看文档中的响应字段；说话人标签属于单独的能力。

## Give your product a voice

Speech, cloning, and transcription behind one key. Start free, no credit card required.

- [Get API Key](https://runapi.ai/zh-CN/login)
- [Read the Docs](https://runapi.ai/zh-CN/docs/guides)


---

## More from RunAPI

- [Home](https://runapi.ai/zh-CN/.md)
### 产品
- [模型目录](https://runapi.ai/zh-CN/models.md)
- [定价](https://runapi.ai/zh-CN/pricing.md)
- [提供方](https://runapi.ai/zh-CN/models#all-models)
### 开发者
- [文档](https://runapi.ai/zh-CN/docs/guides)
- [SDK](https://runapi.ai/zh-CN/sdk.md)
- [CLI](https://runapi.ai/zh-CN/cli.md)
- [MCP Server](https://runapi.ai/zh-CN/mcp.md)
### 指南
- [Claude Code 与 Cursor](https://runapi.ai/zh-CN/claude-code-vs-cursor.md)
- [Cursor API 设置](https://runapi.ai/zh-CN/cursor-api-setup.md)
- [RunAPI 与 OpenRouter](https://runapi.ai/zh-CN/openrouter-alternative.md)
### 公司
- [企业版](https://runapi.ai/zh-CN/contact.md)
- [联系](https://runapi.ai/zh-CN/contact.md)
### 法律
- [服务条款](https://runapi.ai/zh-CN/terms.md)
- [隐私政策](https://runapi.ai/zh-CN/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-CN",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-CN",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-CN/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-CN",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-CN",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-CNicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-CN",
    "@type": "CollectionPage",
    "name": "AI 音频与语音 API",
    "description": "通过一个公开音频 API 使用文本转语音、声音克隆、转写和音效能力。",
    "url": "https://runapi.ai/zh-CN/audio"
  }
]
```
