mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:20:43 +00:00
test(openai): preserve zero realtime transcription vad config
This commit is contained in:
@@ -46,6 +46,26 @@ describe("buildOpenAIRealtimeTranscriptionProvider", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("preserves explicit zero-valued VAD settings", () => {
|
||||
const provider = buildOpenAIRealtimeTranscriptionProvider();
|
||||
const resolved = provider.resolveConfig?.({
|
||||
cfg: {} as never,
|
||||
rawConfig: {
|
||||
providers: {
|
||||
openai: {
|
||||
silenceDurationMs: 0,
|
||||
vadThreshold: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(resolved).toMatchObject({
|
||||
silenceDurationMs: 0,
|
||||
vadThreshold: 0,
|
||||
});
|
||||
});
|
||||
|
||||
it("accepts the legacy openai-realtime alias", () => {
|
||||
const provider = buildOpenAIRealtimeTranscriptionProvider();
|
||||
expect(provider.aliases).toContain("openai-realtime");
|
||||
|
||||
Reference in New Issue
Block a user