How to use web-speech-cognitive-services - 3 common examples

To help you get started, we’ve selected a few web-speech-cognitive-services examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github compulim / web-speech-cognitive-services / packages / playground / src / data / sagas / setPonyfill.js View on Github external
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
github microsoft / BotFramework-WebChat / packages / bundle / src / createCognitiveServicesBingSpeechPonyfillFactory.js View on Github external
export default async function createCognitiveServicesBingSpeechPonyfillFactory({
  authorizationToken,
  subscriptionKey
}) {
  const ponyfill = await createPonyfill({ authorizationToken, subscriptionKey });
  const { SpeechGrammarList, speechSynthesis, SpeechSynthesisUtterance } = ponyfill;

  return ({ referenceGrammarID }) => ({
    SpeechGrammarList,
    SpeechRecognition: injectReferenceGrammarID(ponyfill, referenceGrammarID),
    speechSynthesis,
    SpeechSynthesisUtterance
  });
}
github microsoft / BotFramework-WebChat / packages / bundle / src / createCognitiveServicesSpeechServicesPonyfillFactory.js View on Github external
return ({ referenceGrammarID }) => {
    const ponyfill = createPonyfill({
      audioConfig,
      authorizationToken,
      enableTelemetry,
      referenceGrammars: [`luis/${referenceGrammarID}-PRODUCTION`],
      region,
      speechRecognitionEndpointId,
      speechSynthesisDeploymentId,
      speechSynthesisOutputFormat,
      subscriptionKey,
      textNormalization
    });

    const { SpeechGrammarList, SpeechRecognition, speechSynthesis, SpeechSynthesisUtterance } = ponyfill;

    return {
      SpeechGrammarList,

web-speech-cognitive-services

Polyfill Web Speech API with Cognitive Services Speech-to-Text service

MIT
Latest version published 1 year ago

Package Health Score

45 / 100
Full package analysis