Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
authorizationToken: onDemandAuthorizationToken ? () => {
console.log('On-demand fetching Bing Speech authorization token');
try {
return fetchBingSpeechAuthorizationToken(bingSpeechSubscriptionKey);
} catch (err) {
console.error('Failed to fetch Bing Speech authorization token', err);
}
} : null,
subscriptionKey: onDemandAuthorizationToken ? null : bingSpeechSubscriptionKey