Files
openclaw/extensions/gradium
Yiğit ERDOĞAN 65d64818bb fix(tts): reject non-audio speech synthesis responses (#117345)
* fix(tts): reject non-audio speech synthesis responses

A successful HTTP 200 carrying a JSON error, an HTML sign-in page, or a
zero-byte body was returned as an audio buffer and written out as a playable
attachment. Route the xAI, Gradium, and Azure Speech synthesizers through the
shared binary-response contract that the OpenAI-compatible speech provider
already uses, so the media kind is validated before the body is read and the
unread body is canceled when it is rejected.

Each provider keeps its own overflow wording, so operator-facing messages are
unchanged apart from the new malformed-response rejection.

* test(azure-speech): prove the audio guard closes a real upstream socket

Adds a loopback node:http server that answers 200 with a JSON content type
and then never ends the body, driven through the real azureSpeechTTS path
with the real global fetch and no stubbed transport. Without the guard the
synthesis hangs to its timeout with the socket still open; with it the
response is rejected immediately and the server observes the close.

* fix(openai): reject malformed binary speech responses

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-01 16:13:15 -07:00
..

OpenClaw Gradium Plugin

Official OpenClaw plugin for Gradium.

Install from OpenClaw:

openclaw plugins install @openclaw/gradium-speech
openclaw gateway restart

See https://docs.openclaw.ai/providers/gradium for setup and configuration.