mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
speech-core: fix TTS regression test typing
This commit is contained in:
committed by
Peter Steinberger
parent
b3d7fd166a
commit
271d3b3bdb
@@ -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<ReturnType<SpeechProviderPlugin["synthesize"]>>;
|
||||
|
||||
const synthesizeMock = vi.hoisted(() =>
|
||||
vi.fn(
|
||||
async (request: SpeechSynthesisRequest): Promise<SpeechSynthesisResult> => ({
|
||||
async (request: SpeechSynthesisRequest): Promise<MockSpeechSynthesisResult> => ({
|
||||
audioBuffer: Buffer.from("voice"),
|
||||
fileExtension: ".ogg",
|
||||
outputFormat: "ogg",
|
||||
|
||||
Reference in New Issue
Block a user