Skip to content

bug: voice-call TTS speed config uses || instead of ?? (same class as #39191) #39285

@mvanhorn

Description

@mvanhorn

Bug

In extensions/voice-call/src/providers/tts-openai.ts:85, the speed default uses || instead of ??:

this.speed = config.speed || 1.0;

Same class of bug as #39191 and #39190|| treats 0 as falsy, so any falsy numeric value silently becomes the default.

While the current OpenAI API minimum speed is 0.25, using ?? is correct and consistent with the fixes for the STT provider.

Expected behavior

Use ?? so only undefined/null triggers the default:

this.speed = config.speed ?? 1.0;

Impact

Low — defensive fix for consistency with #39190 and #39191.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions