Skip to main content

Documentation Index

Fetch the complete documentation index at: https://openclaw.zhcndoc.com/llms.txt

Use this file to discover all available pages before exploring further.

Inworld 是一个流式文本转语音(TTS)提供商。在 OpenClaw 中,它会 为外发回复合成音频(默认 MP3,语音备注为 OGG_OPUS) 以及用于 Voice Call 等通话渠道的 PCM 音频。 OpenClaw 会向 Inworld 的流式 TTS 端点发送请求,将返回的 base64 音频分片拼接为单个缓冲区,并将结果交给标准回复音频管道。
详情
网站inworld.ai
文档docs.inworld.ai/tts/tts
认证INWORLD_API_KEY(HTTP Basic,Base64 仪表盘凭证)
默认音色Sarah
默认模型inworld-tts-1.5-max

开始使用

1

设置你的 API 密钥

从你的 Inworld 仪表盘(Workspace > API Keys)复制凭证 并将其设置为环境变量。该值会按原样作为 HTTP Basic 凭证发送,因此不要再次对其进行 Base64 编码,也不要将其转换为 bearer token。
INWORLD_API_KEY=<base64-credential-from-dashboard>
2

在 messages.tts 中选择 Inworld

{
  messages: {
    tts: {
      auto: "always",
      provider: "inworld",
      providers: {
        inworld: {
          voiceId: "Sarah",
          modelId: "inworld-tts-1.5-max",
        },
      },
    },
  },
}
3

发送消息

通过任意已连接的渠道发送回复。OpenClaw 会使用 Inworld 合成 音频,并将其作为 MP3(如果渠道 期望语音备注,则为 OGG_OPUS)交付。

配置选项

选项路径描述
apiKeymessages.tts.providers.inworld.apiKeyBase64 仪表盘凭证。回退到 INWORLD_API_KEY
baseUrlmessages.tts.providers.inworld.baseUrl覆盖 Inworld API 基础 URL(默认 https://api.inworld.ai)。
voiceIdmessages.tts.providers.inworld.voiceId音色标识符(默认 Sarah)。
modelIdmessages.tts.providers.inworld.modelIdTTS 模型 id(默认 inworld-tts-1.5-max)。
temperaturemessages.tts.providers.inworld.temperature采样温度 0..2(可选)。

说明

Inworld 使用 HTTP Basic 认证,采用一个 Base64 编码的凭证 字符串。从 Inworld 仪表盘中原样复制即可。该提供商会将其作为 Authorization: Basic <apiKey> 发送,不会进行任何进一步编码,因此 不要自行对其进行 Base64 编码,也不要传入 bearer 风格的令牌。 参见 TTS 认证说明 获取同样的提示。
支持的模型 id:inworld-tts-1.5-max(默认)、 inworld-tts-1.5-miniinworld-tts-1-maxinworld-tts-1
回复默认使用 MP3。当渠道目标是 voice-note 时,OpenClaw 会向 Inworld 请求 OGG_OPUS,以便音频作为原生 语音气泡播放。通话合成使用原始 PCM,采样率为 22050 Hz, 供通话桥接使用。
使用 messages.tts.providers.inworld.baseUrl 覆盖 API 主机。 发送请求前会移除末尾的斜杠。

相关内容

文本转语音

TTS 概览、提供商,以及 messages.tts 配置。

配置

包含 messages.tts 设置在内的完整配置参考。

提供商

所有内置的 OpenClaw 提供商。

故障排除

常见问题和调试步骤。