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

# 插件 - 智能语音助手

> 拥有丰富的音色库，提供高拟真度的语音合成（TTS）与精准的语音转文字服务。

<Columns cols={1}>
  <Card title="在扣子中收藏插件" icon="plug-circle-plus" href="https://www.coze.cn/store/plugin/7606372921954566186">
    如果您想自己动手搭建工作流，可在扣子平台中收藏此插件以备使用
  </Card>
</Columns>

## 语音合成 (voice\_generation)

不超过200字的文本转语音合成，众多音色可供选择。

### voice\_generation - 输入参数

<ParamField body="text" type="string" required>
  **待合成文本**，待合成语音的文本内容，单次请求字符长度上限为 200 字。
</ParamField>

<ParamField body="voice" type="string" required>
  **音色名称**，音色唯一标识符，即指定的发音人，包含男声、女声、童声及多种情感风格。

  当前主要采用的是阿里千问的语音音色，点击测试 [音色体验](https://ai.aliyun.com/nls/tts)，点击查看 [音色名称列表](https://help.aliyun.com/zh/isi/developer-reference/overview-of-speech-synthesis#5186fe1abb7ag)
</ParamField>

<ParamField body="volume" type="integer">
  **音量**，控制语音播放时的声音大小，范围 `0 ~ 100`，`0` 静音，默认值 `50`。
</ParamField>

<ParamField body="speech_rate" type="integer">
  **语速**，控制语音播放时的语速快慢，范围 `-500 ~ 500`，`0` 默认值 `0`。
</ParamField>

<ParamField body="pitch_rate" type="integer">
  **语调**，控制语音播放时的语调高低，范围 `-500 ~ 500`，`0` 默认值 `0`。
</ParamField>

<ParamField body="hezhan_api_key" type="string" required>
  **合芯栈道 API 密钥**，用于识别和验证身份的凭证 `免费获取`。

  * **免费获取方式**：登录 [合芯栈道 - 会员中心](https://www.hexinzhandao.cn/user/home)，在 `API 密钥` 版块中查看。
  * **重要安全建议**：
    * 建议通过工作流开始节点的输入参数的形式使用，而不是直接明文写入插件工具的参数中。
    * 请防止在分享工作流调试记录或截图时无意间展示密钥信息。
  * **密钥失效处理**：若密钥存在泄露风险，请立即在会员中心进行重置，原密钥将即刻失效。
</ParamField>

### voice\_generation - 输出参数

<ResponseField name="success" type="boolean">
  **是否执行成功**，`true` 成功，`false` 失败。
</ResponseField>

<ResponseField name="error" type="string">
  **错误信息**，如果没有执行成功，这里会显示错误信息，否则为空。
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable title="查看 output 内部字段" defaultOpen>
    <ResponseField name="audio_url" type="string">
      **生成语音的 URL**，可直接打开的语音链接。
    </ResponseField>

    <ResponseField name="duration" type="number">
      **生成语音的时长**，单位 `秒`。
    </ResponseField>
  </Expandable>
</ResponseField>
