Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Jan 24, 2019
1 parent bda740f commit ab3a879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions samples/06.b.cognitive-services-bing-speech-react/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
const { render } = window.ReactDOM;
const {
Context,
createCognitiveServicesWebSpeechPonyfillFactory,
createCognitiveServicesBingSpeechPonyfillFactory,
createDirectLine,
ReactWebChat
} = window.WebChat;
Expand All @@ -55,12 +55,12 @@
if (subscriptionKey) {
// In case you are using your own subscription key, please note that client should always authenticate against your server
// to avoid exposing the subscription key to any part of your client code.
webSpeechPonyfillFactory = await window.WebChat.createCognitiveServicesBingSpeechPonyfillFactory({ subscriptionKey });
webSpeechPonyfillFactory = await createCognitiveServicesBingSpeechPonyfillFactory({ subscriptionKey });
} else {
const res = await fetch('https://webchat-mockbot.azurewebsites.net/bingspeech/token', { method: 'POST' });
const { token: authorizationToken } = await res.json();

webSpeechPonyfillFactory = await window.WebChat.createCognitiveServicesBingSpeechPonyfillFactory({ authorizationToken });
webSpeechPonyfillFactory = await createCognitiveServicesBingSpeechPonyfillFactory({ authorizationToken });
}

// Pass a Web Speech ponyfill factory to renderWebChat.
Expand Down

0 comments on commit ab3a879

Please sign in to comment.