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

# TTS（文字转语音）

> 使用 C# SDK 调用 `/audio/speech`。

**方法**：`client.CreateSpeech(...)`

### 示例

```csharp theme={null}
using PhaseoSdk;

var client = new Phaseo(apiKey);
var response = await client.CreateSpeech(new Dictionary<string, object>
{
    ["model"] = "openai/gpt-4o-mini-tts",
    ["input"] = "Hello world",
    ["voice"] = "alloy",
    ["format"] = "mp3"
});
```

### 主要参数

* `model`（必填）：支持 TTS 的模型 ID。
* `input`（必填）：要合成的文本。
* `voice`：语音预设（因模型而异，例如 `alloy`）。
* `format`：`mp3`、`wav`、`flac` 等。
* `speed`：播放速度倍率（通常为 0.25–4）。

### 返回值

二进制音频数据


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