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>
This commit is contained in:
Efe Büken
2026-06-23 01:03:55 +03:00
committed by GitHub
parent 8357260081
commit 739e6cbbf8
2 changed files with 5 additions and 1 deletions

View File

@@ -408,7 +408,7 @@ describe("buildMinimaxSpeechProvider", () => {
return JSON.parse(init.body) as Record<string, unknown>;
}
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<string, unknown>).voice_id).toBe(
"English_expressive_narrator",
);

View File

@@ -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,