> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/other-integrations/third-party-api-integrations/elevenlabs-api-integration.md).

# ElevenLabs API 集成

这是一份关于如何将你的 ElevenLabs 声音与 Convai 角色集成的指南

{% hint style="danger" %}
**目前，由于音频输出为 44.1 kHz，只有订阅了 Pro 及更高级别方案的 ElevenLabs 账户兼容。**\
\
**所有 Convai 账户等级均可添加 ElevenLabs API 密钥集成。**
{% endhint %}

{% hint style="info" %}
**注意：如果与角色对话时遇到令牌错误，请确认您的 ElevenLabs 订阅有效，并且账户仍有可用令牌额度。请前往** [**ElevenLabs.io**](https://elevenlabs.io/) **控制面板查看。**
{% endhint %}

第 1 步：前往 [elevenlabs.io](https://elevenlabs.io/) 并进入个人资料页面。

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FJdLY4BmPdvtZLP8KypDV%2FUntitled%20design%20(5).png?alt=media&amp;token=48114d79-a869-4b7a-b442-dd2b873d60d4" alt=""><figcaption></figcaption></figure>

第 2 步：在个人资料页面中，创建具有以下权限的 API 密钥：

`Text to Speech` : `Access`

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FRewYvX7e8yOf82635CaA%2FScreenshot%202025-08-27%20at%205.54.40%E2%80%AFPM.png?alt=media&amp;token=83f20937-6b52-4f60-bc4a-2a9867411cdf" alt=""><figcaption></figcaption></figure>

`Voices` : `Read`

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FDUiA3eccUdqEbYPW9ESa%2FScreenshot%202025-08-27%20at%205.54.57%E2%80%AFPM.png?alt=media&amp;token=8099e90b-e1b2-4487-b0ef-75f4b70aae67" alt=""><figcaption></figcaption></figure>

`User` : `Read`

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FVS3WKWUzRu3rzXOturlV%2FScreenshot%202025-08-27%20at%205.55.11%E2%80%AFPM.png?alt=media&amp;token=346a1c8c-8996-44a9-a07a-aff74349c2c6" alt=""><figcaption></figcaption></figure>

复制 API 密钥，以便在下一步中使用。

第 3 步：接着，登录 convai.com 并打开个人资料页面。

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtvHXv9Cpl8QzA5tY9MJh%2Fuploads%2FAJxT96IvZIPOhEMg3M5G%2FScreenshot%202024-02-06%20at%206.45.04%E2%80%AFPM.png?alt=media&#x26;token=9103ac42-6597-48d8-8e0f-c429acfaaa49" alt=""><figcaption></figcaption></figure>

第 4 步：点击右下角“API 集成”中的“添加新密钥”按钮。

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FlaOPnoRsWt60bzCYQOlW%2FUntitled%20design%20(2).png?alt=media&amp;token=e2938ea2-4c08-478a-893a-ba5885eb6a3b" alt=""><figcaption></figcaption></figure>

第 5 步：弹出窗口后，选择 ElevenLabs，然后粘贴 API 密钥并点击“添加”。

{% hint style="danger" %}
**您的声音将在一段时间后（约 12 小时）显示在 Convai 控制面板中。**\
**您可以通过移除并重新添加 ElevenLabs API 密钥，加快新添加声音的显示速度。**
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtvHXv9Cpl8QzA5tY9MJh%2Fuploads%2Fs8EbPIU1l9PpKRJNuseC%2FScreenshot%202024-02-06%20at%206.48.43%E2%80%AFPM.png?alt=media&#x26;token=774991bb-c41a-4743-afed-6e0094850c81" alt=""><figcaption></figcaption></figure>

第 6 步：前往任意角色，在“角色描述”下选择“角色语音”，滚动至底部，即可看到新的“Elevenlabs-Private-Voices”部分，所有声音都会显示在其中。选择所需声音并使用即可。

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtvHXv9Cpl8QzA5tY9MJh%2Fuploads%2FS9INCC48hKOpkP85fLXI%2FScreenshot%202024-02-06%20at%207.04.09%E2%80%AFPM.png?alt=media&#x26;token=f0168791-2e67-49fe-bc8b-21eee468870b" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/other-integrations/third-party-api-integrations/elevenlabs-api-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
