forked from microsoft/BotBuilder-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
183 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Bot Framework Credentials | ||
|
||
MICROSOFT_APP_ID= | ||
MICROSOFT_APP_PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Roller Sample Skill | ||
|
||
A simple dice rolling skill/bot that's been optimized for speech enabled channels. | ||
|
||
[![Deploy to Azure][Deploy Button]][Deploy Node/RollerSkill] | ||
|
||
[Deploy Button]: https://azuredeploy.net/deploybutton.png | ||
[Deploy Node/SendRollerSkill]: https://azuredeploy.net | ||
|
||
### Prerequisites | ||
|
||
The minimum prerequisites to run this sample are: | ||
* Latest Node.js with NPM. Download it from [here](https://nodejs.org/en/download/). | ||
* The Bot Framework Emulator. To install the Bot Framework Emulator, download it from [here](https://emulator.botframework.com/). Please refer to [this documentation article](https://github.com/microsoft/botframework-emulator/wiki/Getting-Started) to know more about the Bot Framework Emulator. | ||
* **[Recommended]** Visual Studio Code for IntelliSense and debugging, download it from [here](https://code.visualstudio.com/) for free. | ||
|
||
### Code Highlights | ||
|
||
The sample showcases the use of new features designed specifically for speech: | ||
|
||
* **IMessage.speak**: Lets include Speech Synthesis Markup Language (SSML) in your bots responses to control what the bot says, in addition to what it shows. A small [utility module](ssml.js) is included to simplify building up your bots SSML based responses. | ||
* **IMessage.inputHint**: Used to provide a speech based client with hints as to how they should manage the microphone. A hint of `InputHints.ignoringInput` can be sent to tell the client that the bot will be sending more messages and should wait to open the mic. The `InputHints.acceptingInput` hint means that the bot is finished speaking and ready to receive additional requests from the user but the mic should be closed. And the `InputHints.expectingInput` hint indicates that the bot is expecting an answer to a prompt and the mic should be left open. In general, the SDK will send these hints for you automatically so you don't have to worry too much about them. | ||
* **Session.say()**: A new method that can be called in place of `Session.send()` and includes additional parameters for sending SSML output, as well as attachments like cards. | ||
* **IPromptOptions.speak & retrySpeak**: The built-in prompts have all been updated to support sending SSML as part of the prompts output. | ||
* **Prompts.choice() synonyms**: The built-in choice() prompt has been updated to support passing in synonyms which allows for more flexibility recognition wise. | ||
* **Other Prompt Improvements**: A number of other improvements have been made to the built-in prompts to add with building bots that work better with speech recognition. | ||
|
||
### More Information | ||
|
||
To get more information about how to get started in Bot Builder for Node and Attachments please review the following resources: | ||
* [Bot Builder for Node.js Reference](https://docs.botframework.com/en-us/node/builder/overview/#navtitle) | ||
* [SSML Language Reference](https://msdn.microsoft.com/en-us/library/hh378377(v=office.14).aspx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"siteName": { | ||
"defaultValue": "BotBuilder-Samples", | ||
"type": "string" | ||
}, | ||
"hostingPlanName": { | ||
"type": "string" | ||
}, | ||
"siteLocation": { | ||
"type": "string" | ||
}, | ||
"sku": { | ||
"type": "string", | ||
"allowedValues": [ | ||
"Free", | ||
"Shared", | ||
"Basic", | ||
"Standard" | ||
], | ||
"defaultValue": "Free" | ||
}, | ||
"workerSize": { | ||
"type": "string", | ||
"allowedValues": [ | ||
"0", | ||
"1", | ||
"2" | ||
], | ||
"defaultValue": "0" | ||
}, | ||
"repoUrl": { | ||
"type": "string" | ||
}, | ||
"branch": { | ||
"type": "string" | ||
}, | ||
"Project": { | ||
"type": "string", | ||
"defaultValue": "Node/demo-RollerSkill" | ||
}, | ||
"WEBSITE_NODE_DEFAULT_VERSION": { | ||
"type": "string", | ||
"defaultValue": "5.9.1" | ||
}, | ||
"MICROSOFT_APP_ID": { | ||
"type": "string" | ||
}, | ||
"MICROSOFT_APP_PASSWORD": { | ||
"type": "string" | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"apiVersion": "2014-06-01", | ||
"name": "[parameters('hostingPlanName')]", | ||
"type": "Microsoft.Web/serverFarms", | ||
"location": "[parameters('siteLocation')]", | ||
"properties": { | ||
"name": "[parameters('hostingPlanName')]", | ||
"sku": "[parameters('sku')]", | ||
"workerSize": "[parameters('workerSize')]", | ||
"numberOfWorkers": 1 | ||
} | ||
}, | ||
{ | ||
"apiVersion": "2014-06-01", | ||
"name": "[parameters('siteName')]", | ||
"type": "Microsoft.Web/Sites", | ||
"location": "[parameters('siteLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Web/serverFarms/', parameters('hostingPlanName'))]" | ||
], | ||
"tags": { | ||
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty" | ||
}, | ||
"properties": { | ||
"name": "[parameters('siteName')]", | ||
"serverFarm": "[parameters('hostingPlanName')]" | ||
}, | ||
"resources": [ | ||
{ | ||
"apiVersion": "2014-04-01", | ||
"type": "config", | ||
"name": "web", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Web/Sites/', parameters('siteName'))]" | ||
], | ||
"properties": { | ||
"appSettings": [ | ||
{ | ||
"name": "Project", | ||
"value": "[parameters('Project')]" | ||
}, | ||
{ | ||
"name": "WEBSITE_NODE_DEFAULT_VERSION", | ||
"value": "[parameters('WEBSITE_NODE_DEFAULT_VERSION')]" | ||
}, | ||
{ | ||
"name": "MICROSOFT_APP_ID", | ||
"value": "[parameters('MICROSOFT_APP_ID')]" | ||
}, | ||
{ | ||
"name": "MICROSOFT_APP_PASSWORD", | ||
"value": "[parameters('MICROSOFT_APP_PASSWORD')]" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"apiVersion": "2014-04-01", | ||
"name": "web", | ||
"type": "sourcecontrols", | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]", | ||
"[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/web')]" | ||
], | ||
"properties": { | ||
"RepoUrl": "[parameters('repoUrl')]", | ||
"branch": "[parameters('branch')]", | ||
"IsManualIntegration": true | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters