Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miguelmota/intent-utterance-generator
Alexa Skills Kit Sample Utterances generator.
https://github.com/miguelmota/intent-utterance-generator
Last synced: 3 months ago
JSON representation
Alexa Skills Kit Sample Utterances generator.
- Host: GitHub
- URL: https://github.com/miguelmota/intent-utterance-generator
- Owner: miguelmota
- License: mit
- Archived: true
- Created: 2016-01-24T19:28:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-24T20:42:27.000Z (almost 9 years ago)
- Last Synced: 2024-07-04T01:52:57.154Z (4 months ago)
- Language: JavaScript
- Homepage: https://github.com/miguelmota/intent-utterance-generator
- Size: 7.81 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# intent-utterance-generator
> [Alexa Skills Kit Sample Utterances](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/defining-the-voice-interface) generator.
# Install
```bash
npm install intent-utterance-generator
```# Usage
The generator expects an object with intent names as keys and phrases to expand as the values. It uses [intent-utterance-expander](https://github.com/miguelmota/intent-utterance-expander) to expand phrases.
The result is a [*Buffer*](https://nodejs.org/api/buffer.html) containing the generated expanded phrases which you can then copy over it to the Sample Utterances input field in the Alexa Skills Kit portal.
```javascript
const intentUtteranceGenerator = require('intent-utterance-generator');var intents = {
StartNewGameIntent: [
'(start|begin|launch) new game',
'start over'
],
HighScoreIntent: 'What are the (top|high) scores'
};console.log(intentUtteranceGenerator(intents).toString());
/*
StartNewGameIntent start new game
StartNewGameIntent begin new game
StartNewGameIntent launch new game
StartNewGameIntent start overHighScoreIntent What are the top scores
HighScoreIntent What are the high scores
*/
```# Test
```bash
npm test
```# License
MIT