Prefer OpenAI speech in daemon-client e2e when available

This commit is contained in:
Mohamed Boudra
2026-02-06 16:36:35 +07:00
parent c172e5c939
commit a5031e02e7
@@ -92,13 +92,16 @@ describe("daemon client E2E", () => {
let ctx: DaemonTestContext; let ctx: DaemonTestContext;
beforeAll(async () => { beforeAll(async () => {
ctx = await createDaemonTestContext({ const speechConfig = openaiApiKey
dictationFinalTimeoutMs: 5000, ? {
...(openaiApiKey ? { openai: { apiKey: openaiApiKey } } : {}), dictationSttProvider: "openai" as const,
speech: { voiceSttProvider: "openai" as const,
dictationSttProvider: "local", voiceTtsProvider: "openai" as const,
voiceSttProvider: "local", }
voiceTtsProvider: "local", : {
dictationSttProvider: "local" as const,
voiceSttProvider: "local" as const,
voiceTtsProvider: "local" as const,
sherpaOnnx: { sherpaOnnx: {
modelsDir: sherpaModelsDir, modelsDir: sherpaModelsDir,
stt: { stt: {
@@ -108,7 +111,12 @@ describe("daemon client E2E", () => {
preset: process.env.PASEO_SHERPA_TTS_PRESET ?? "kitten-nano-en-v0_1-fp16", preset: process.env.PASEO_SHERPA_TTS_PRESET ?? "kitten-nano-en-v0_1-fp16",
}, },
}, },
}, };
ctx = await createDaemonTestContext({
dictationFinalTimeoutMs: 5000,
...(openaiApiKey ? { openai: { apiKey: openaiApiKey } } : {}),
speech: speechConfig,
}); });
}, 60000); }, 60000);