Skip to content

Instantly share code, notes, and snippets.

@s-bauer
Created July 31, 2018 13:30
Show Gist options
  • Save s-bauer/a4b093f2eedc95972cecd97cba98ce90 to your computer and use it in GitHub Desktop.
Save s-bauer/a4b093f2eedc95972cecd97cba98ce90 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
</head>
<body>
<div id="bot"/>
<script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
<script>
var speechOptions = {
speechRecognizer: new CognitiveServices.SpeechRecognizer( { subscriptionKey: 'YOUR_COGNITIVE_SPEECH_API_KEY' } ),
speechSynthesizer: new CognitiveServices.SpeechSynthesizer(
{
subscriptionKey: 'YOUR_COGNITIVE_SPEECH_API_KEY',
gender: CognitiveServices.SynthesisGender.Female,
voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)'
})
}
BotChat.App({
directLine: { secret: 'L98iHQgz5aM.cwA.YEc.wrVh8Ky6XKJwm65_7zL8RhV5jYtwJ9OsJnZOpE9XL8I' },
user: { id: 'userid' },
bot: { id: 'addd3989-185a-4211-970d-fc8a22f730b7' },
resize:  'detect',
speechOptions: speechOptions
}, document.getElementById("bot"));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment