Bug
In extensions/voice-call/src/providers/stt-openai-realtime.ts:65-66, the constructor uses || (logical OR) instead of ?? (nullish coalescing) for default values:
this.silenceDurationMs = config.silenceDurationMs || 800;
this.vadThreshold = config.vadThreshold || 0.5;
This drops valid 0 values:
vadThreshold: 0 means maximum VAD sensitivity (detect everything as speech) — valid per the schema z.number().min(0).max(1) and the OpenAI Realtime API
silenceDurationMs: 0 means no silence padding before triggering end-of-speech
When a user configures vadThreshold: 0, they silently get 0.5 instead.
Expected behavior
Use ?? so that 0 is respected and only undefined/null triggers the default:
this.silenceDurationMs = config.silenceDurationMs ?? 800;
this.vadThreshold = config.vadThreshold ?? 0.5;
Impact
Medium — users who set vadThreshold: 0 for maximum sensitivity get medium sensitivity (0.5) without any error or warning.
Bug
In
extensions/voice-call/src/providers/stt-openai-realtime.ts:65-66, the constructor uses||(logical OR) instead of??(nullish coalescing) for default values:This drops valid
0values:vadThreshold: 0means maximum VAD sensitivity (detect everything as speech) — valid per the schemaz.number().min(0).max(1)and the OpenAI Realtime APIsilenceDurationMs: 0means no silence padding before triggering end-of-speechWhen a user configures
vadThreshold: 0, they silently get0.5instead.Expected behavior
Use
??so that0is respected and onlyundefined/nulltriggers the default:Impact
Medium — users who set
vadThreshold: 0for maximum sensitivity get medium sensitivity (0.5) without any error or warning.