From 739e6cbbf88eee016efa5b353a76f5154db69978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efe=20B=C3=BCken?= Date: Tue, 23 Jun 2026 01:03:55 +0300 Subject: [PATCH] fix(minimax): request hex TTS output explicitly * fix(minimax): request hex TTS output explicitly * fix(minimax): request hex TTS output explicitly --------- Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com> --- extensions/minimax/speech-provider.test.ts | 4 +++- extensions/minimax/tts.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/minimax/speech-provider.test.ts b/extensions/minimax/speech-provider.test.ts index bd549fb63469..936b17300915 100644 --- a/extensions/minimax/speech-provider.test.ts +++ b/extensions/minimax/speech-provider.test.ts @@ -408,7 +408,7 @@ describe("buildMinimaxSpeechProvider", () => { return JSON.parse(init.body) as Record; } - it("makes correct API call and decodes hex response", async () => { + it("requests non-streaming hex audio and decodes the hex response", async () => { const hexAudio = Buffer.from("fake-audio-data").toString("hex"); const mockFetch = vi.mocked(globalThis.fetch); mockFetch.mockResolvedValueOnce( @@ -437,6 +437,8 @@ describe("buildMinimaxSpeechProvider", () => { const body = firstFetchBody(); expect(body.model).toBe("speech-2.8-hd"); expect(body.text).toBe("Hello world"); + expect(body.stream).toBe(false); + expect(body.output_format).toBe("hex"); expect((body.voice_setting as Record).voice_id).toBe( "English_expressive_narrator", ); diff --git a/extensions/minimax/tts.ts b/extensions/minimax/tts.ts index bbc20fcb0c02..aaac67d5da87 100644 --- a/extensions/minimax/tts.ts +++ b/extensions/minimax/tts.ts @@ -83,6 +83,8 @@ export async function minimaxTTS(params: { body: JSON.stringify({ model, text, + stream: false, + output_format: "hex", voice_setting: { voice_id: voiceId, speed,