From faa4dbedda3ef9fba3e20a12678e21b114e62c8a Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Sat, 25 Apr 2026 03:39:08 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@7875092f4ddc6f2dbe218bea8506c9ac1da87c39 --- .openclaw-sync/source.json | 4 ++-- docs/providers/openrouter.md | 26 ++++++++++++++++++++++++++ docs/tools/tts.md | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index b57bedce5..b8f07b112 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "96515891a25e8a6640a5e63de714778c722743c9", - "syncedAt": "2026-04-25T03:33:12.568Z" + "sha": "7875092f4ddc6f2dbe218bea8506c9ac1da87c39", + "syncedAt": "2026-04-25T03:37:45.831Z" } diff --git a/docs/providers/openrouter.md b/docs/providers/openrouter.md index 0c623648e..8b66a9508 100644 --- a/docs/providers/openrouter.md +++ b/docs/providers/openrouter.md @@ -79,6 +79,32 @@ OpenRouter can also back the `image_generate` tool. Use an OpenRouter image mode OpenClaw sends image requests to OpenRouter's chat completions image API with `modalities: ["image", "text"]`. Gemini image models receive supported `aspectRatio` and `resolution` hints through OpenRouter's `image_config`. +## Text-to-speech + +OpenRouter can also be used as a TTS provider through its OpenAI-compatible +`/audio/speech` endpoint. + +```json5 +{ + messages: { + tts: { + auto: "always", + provider: "openrouter", + providers: { + openrouter: { + model: "hexgrad/kokoro-82m", + voice: "af_alloy", + responseFormat: "mp3", + }, + }, + }, + }, +} +``` + +If `messages.tts.providers.openrouter.apiKey` is omitted, TTS reuses +`models.providers.openrouter.apiKey`, then `OPENROUTER_API_KEY`. + ## Authentication and headers OpenRouter uses a Bearer token with your API key under the hood. diff --git a/docs/tools/tts.md b/docs/tools/tts.md index d8d6bbdd1..7871538c2 100644 --- a/docs/tools/tts.md +++ b/docs/tools/tts.md @@ -231,6 +231,32 @@ Resolution order is `messages.tts.providers.xai.apiKey` -> `XAI_API_KEY`. Current live voices are `ara`, `eve`, `leo`, `rex`, `sal`, and `una`; `eve` is the default. `language` accepts a BCP-47 tag or `auto`. +### OpenRouter primary + +```json5 +{ + messages: { + tts: { + auto: "always", + provider: "openrouter", + providers: { + openrouter: { + apiKey: "openrouter_api_key", + model: "hexgrad/kokoro-82m", + voice: "af_alloy", + responseFormat: "mp3", + }, + }, + }, + }, +} +``` + +OpenRouter TTS uses the same `OPENROUTER_API_KEY` path as the bundled +OpenRouter model provider. Resolution order is +`messages.tts.providers.openrouter.apiKey` -> +`models.providers.openrouter.apiKey` -> `OPENROUTER_API_KEY`. + ### Gradium primary ```json5 @@ -361,6 +387,12 @@ Then run: - `providers.xai.language`: BCP-47 language code or `auto` (default `en`). - `providers.xai.responseFormat`: `mp3`, `wav`, `pcm`, `mulaw`, or `alaw` (default `mp3`). - `providers.xai.speed`: provider-native speed override. +- `providers.openrouter.apiKey`: OpenRouter API key (env: `OPENROUTER_API_KEY`; can reuse `models.providers.openrouter.apiKey`). +- `providers.openrouter.baseUrl`: override the OpenRouter TTS base URL (default `https://openrouter.ai/api/v1`; legacy `https://openrouter.ai/v1` is normalized). +- `providers.openrouter.model`: OpenRouter TTS model id (default `hexgrad/kokoro-82m`; `modelId` is also accepted). +- `providers.openrouter.voice`: provider-specific voice id (default `af_alloy`; `voiceId` is also accepted). +- `providers.openrouter.responseFormat`: `mp3` or `pcm` (default `mp3`). +- `providers.openrouter.speed`: provider-native speed override. - `providers.microsoft.enabled`: allow Microsoft speech usage (default `true`; no API key). - `providers.microsoft.voice`: Microsoft neural voice name (e.g. `en-US-MichelleNeural`). - `providers.microsoft.lang`: language code (e.g. `en-US`).