> ## 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（文本转语音）

> 使用 Python SDK 调用 /audio/speech。

**方法**: `client.generate_speech()`

```python theme={null}
result = client.generate_speech({
    "model": "openai/gpt-4o-mini-tts",
    "input": "Hello world",
    "voice": "alloy",
    "format": "mp3",
})

print(result)
```


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