Skip to content

Commit ce3b961

Browse files
committed
fix(voice-call): use ?? instead of || for TTS speed config
Fixes #39285 Use nullish coalescing (??) instead of logical OR (||) for the speed default value. This prevents falsy numeric values (like 0) from being incorrectly replaced with the default. Consistent with fixes in #39190 and #39191.
1 parent eb9e78d commit ce3b961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/voice-call/src/providers/tts-openai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class OpenAITTSProvider {
8282
this.model = config.model || "gpt-4o-mini-tts";
8383
// Default to coral - good balance of quality and natural tone
8484
this.voice = (config.voice as OpenAITTSVoice) || "coral";
85-
this.speed = config.speed || 1.0;
85+
this.speed = config.speed ?? 1.0;
8686
this.instructions = config.instructions;
8787

8888
if (!this.apiKey) {

0 commit comments

Comments
 (0)