diff --git a/src/plugins/capability-provider-runtime.ts b/src/plugins/capability-provider-runtime.ts index 58043af3762..5d8ffc7fe29 100644 --- a/src/plugins/capability-provider-runtime.ts +++ b/src/plugins/capability-provider-runtime.ts @@ -472,11 +472,12 @@ export function resolvePluginCapabilityProviders entry.provider) as CapabilityProviderForKey[]; } } - const requestedSpeechProviders = - missingRequestedSpeechProviders ?? - (activeProviders.length === 0 && params.key === "speechProviders" - ? collectRequestedSpeechProviderIds(params.cfg) - : undefined); + let requestedSpeechProviders: Set | undefined; + if (params.key === "speechProviders") { + requestedSpeechProviders = + missingRequestedProviders ?? + (activeProviders.length === 0 ? collectRequestedSpeechProviderIds(params.cfg) : undefined); + } const pluginIds = resolveRequestedCapabilityCompatPluginIds({ key: params.key,