From 271d3b3bdbe0cf462eb4536a16baaec91b93a371 Mon Sep 17 00:00:00 2001 From: liuhuaize Date: Fri, 10 Apr 2026 13:31:48 +0800 Subject: [PATCH] speech-core: fix TTS regression test typing --- extensions/speech-core/src/tts.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/speech-core/src/tts.test.ts b/extensions/speech-core/src/tts.test.ts index 04210c4f625..8cc9120b61d 100644 --- a/extensions/speech-core/src/tts.test.ts +++ b/extensions/speech-core/src/tts.test.ts @@ -5,13 +5,14 @@ import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import type { SpeechProviderPlugin, SpeechSynthesisRequest, - SpeechSynthesisResult, } from "openclaw/plugin-sdk/speech-core"; import { afterEach, describe, expect, it, vi } from "vitest"; +type MockSpeechSynthesisResult = Awaited>; + const synthesizeMock = vi.hoisted(() => vi.fn( - async (request: SpeechSynthesisRequest): Promise => ({ + async (request: SpeechSynthesisRequest): Promise => ({ audioBuffer: Buffer.from("voice"), fileExtension: ".ogg", outputFormat: "ogg",