-
-
Notifications
You must be signed in to change notification settings - Fork 57k
Description
Feature request
Problem:
messages.tts.openai accepts apiKey, model, and voice, but does not support a baseUrl (or baseURL) field to override the OpenAI TTS endpoint.
This prevents using OpenAI-compatible local TTS servers (e.g., Kokoro, Piper, or other self-hosted TTS behind an OpenAI-compatible API wrapper) through OpenClaw's built-in tts tool.
The ElevenLabs TTS config already supports baseUrl — the OpenAI TTS section does not.
Proposed solution:
Add an optional baseUrl field to messages.tts.openai:
{
messages: {
tts: {
provider: "openai",
openai: {
apiKey: "local",
baseUrl: "http://127.0.0.1:8190/v1", // <-- new field
model: "kokoro",
voice: "onyx"
}
}
}
}Use case:
Running a local FastAPI server that implements POST /v1/audio/speech (matching OpenAI's TTS API) to serve locally-hosted TTS models (Kokoro, F5-TTS voice cloning, etc.) at zero cost and zero latency.
Current workaround:
Calling the local TTS server via exec/curl and sending the audio file manually, bypassing the built-in tts tool entirely.
Environment:
- OpenClaw 2026.3.2
- Config validation rejects
baseUrlundermessages.tts.openaias an unrecognized key