mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:30:43 +00:00
feat(tts): resolve channel account config generically
This commit is contained in:
@@ -213,6 +213,11 @@ openclaw pairing list feishu
|
||||
appId: "cli_xxx",
|
||||
appSecret: "xxx",
|
||||
name: "Primary bot",
|
||||
tts: {
|
||||
providers: {
|
||||
openai: { voice: "shimmer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
backup: {
|
||||
appId: "cli_yyy",
|
||||
@@ -227,6 +232,10 @@ openclaw pairing list feishu
|
||||
```
|
||||
|
||||
`defaultAccount` controls which account is used when outbound APIs do not specify an `accountId`.
|
||||
`accounts.<id>.tts` uses the same shape as `messages.tts` and deep-merges over
|
||||
global TTS config, so multi-bot Feishu setups can keep shared provider
|
||||
credentials globally while overriding only voice, model, persona, or auto mode
|
||||
per account.
|
||||
|
||||
### Message limits
|
||||
|
||||
@@ -386,6 +395,7 @@ Full configuration: [Gateway configuration](/gateway/configuration)
|
||||
| `channels.feishu.accounts.<id>.appId` | App ID | — |
|
||||
| `channels.feishu.accounts.<id>.appSecret` | App Secret | — |
|
||||
| `channels.feishu.accounts.<id>.domain` | Per-account domain override | `feishu` |
|
||||
| `channels.feishu.accounts.<id>.tts` | Per-account TTS override | `messages.tts` |
|
||||
| `channels.feishu.dmPolicy` | DM policy | `allowlist` |
|
||||
| `channels.feishu.allowFrom` | DM allowlist (open_id list) | [BotOwnerId] |
|
||||
| `channels.feishu.groupPolicy` | Group policy | `allowlist` |
|
||||
|
||||
@@ -122,10 +122,10 @@ openclaw channels add --channel qqbot --account bot2 --token "222222222:secret-o
|
||||
|
||||
STT and TTS support two-level configuration with priority fallback:
|
||||
|
||||
| Setting | Plugin-specific | Framework fallback |
|
||||
| ------- | -------------------- | ----------------------------- |
|
||||
| STT | `channels.qqbot.stt` | `tools.media.audio.models[0]` |
|
||||
| TTS | `channels.qqbot.tts` | `messages.tts` |
|
||||
| Setting | Plugin-specific | Framework fallback |
|
||||
| ------- | -------------------------------------------------------- | ----------------------------- |
|
||||
| STT | `channels.qqbot.stt` | `tools.media.audio.models[0]` |
|
||||
| TTS | `channels.qqbot.tts`, `channels.qqbot.accounts.<id>.tts` | `messages.tts` |
|
||||
|
||||
```json5
|
||||
{
|
||||
@@ -140,12 +140,23 @@ STT and TTS support two-level configuration with priority fallback:
|
||||
model: "your-tts-model",
|
||||
voice: "your-voice",
|
||||
},
|
||||
accounts: {
|
||||
qq-main: {
|
||||
tts: {
|
||||
providers: {
|
||||
openai: { voice: "shimmer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Set `enabled: false` on either to disable.
|
||||
Account-level TTS overrides use the same shape as `messages.tts` and deep-merge
|
||||
over the channel/global TTS config.
|
||||
|
||||
Inbound QQ voice attachments are exposed to agents as audio media metadata while
|
||||
keeping raw voice files out of generic `MediaPaths`. `[[audio_as_voice]]` plain
|
||||
|
||||
@@ -403,8 +403,41 @@ Precedence order for automatic replies, `/tts audio`, `/tts status`, and the
|
||||
|
||||
1. `messages.tts`
|
||||
2. active `agents.list[].tts`
|
||||
3. local `/tts` preferences for this host
|
||||
4. inline `[[tts:...]]` directives when [model overrides](#model-driven-directives) are enabled
|
||||
3. channel override, when the channel supports `channels.<channel>.tts`
|
||||
4. account override, when the channel passes `channels.<channel>.accounts.<id>.tts`
|
||||
5. local `/tts` preferences for this host
|
||||
6. inline `[[tts:...]]` directives when [model overrides](#model-driven-directives) are enabled
|
||||
|
||||
Channel and account overrides use the same shape as `messages.tts` and
|
||||
deep-merge over the earlier layers, so shared provider credentials can stay in
|
||||
`messages.tts` while a channel or bot account changes only voice, model, persona,
|
||||
or auto mode:
|
||||
|
||||
```json5
|
||||
{
|
||||
messages: {
|
||||
tts: {
|
||||
provider: "openai",
|
||||
providers: {
|
||||
openai: { apiKey: "${OPENAI_API_KEY}", model: "gpt-4o-mini-tts" },
|
||||
},
|
||||
},
|
||||
},
|
||||
channels: {
|
||||
feishu: {
|
||||
accounts: {
|
||||
english: {
|
||||
tts: {
|
||||
providers: {
|
||||
openai: { voice: "shimmer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## Personas
|
||||
|
||||
|
||||
Reference in New Issue
Block a user