# Azure TTS 语音接入教程

接入 Azure TTS 需要在配置文件中添加下面几行配置：

```toml
[text_to_speech]

# 引擎名填写这一个
# 设置后可以使用 Azure 的语音转文字功能
engine = "azure"

# 音色名
default = "zh-CN-XiaoyouNeural"

[azure]
tts_speech_key = '你的密钥'
tts_speech_service_region = '你的位置/区域'
```

配置文件中提到的两个值的获取方法请参考：

{% embed url="<https://blog.csdn.net/he99774/article/details/126653141>" %}

你可以在这里查看支持的音色：

{% embed url="<https://learn.microsoft.com/zh-CN/azure/cognitive-services/speech-service/language-support?tabs=tts#neural-voices>" %}

在这里试听：

{% embed url="<https://speech.microsoft.com/portal/voicegallery>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chatgpt-qq.lss233.com/pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/azure-tts-yu-yin-jie-ru-jiao-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
