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;
beforeAll(async () => {
ctx = await createDaemonTestContext({
dictationFinalTimeoutMs: 5000,
...(openaiApiKey ? { openai: { apiKey: openaiApiKey } } : {}),
speech: {
dictationSttProvider: "local",
voiceSttProvider: "local",
voiceTtsProvider: "local",
const speechConfig = openaiApiKey
? {
dictationSttProvider: "openai" as const,
voiceSttProvider: "openai" as const,
voiceTtsProvider: "openai" as const,
}
: {
dictationSttProvider: "local" as const,
voiceSttProvider: "local" as const,
voiceTtsProvider: "local" as const,
sherpaOnnx: {
modelsDir: sherpaModelsDir,
stt: {
@@ -108,7 +111,12 @@ describe("daemon client E2E", () => {
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);