alexa-utterances-tofile

Saves a processed 'utterances' object to file. Defaults the location to save to speechAssets/SampleUtterances.txt

Usage no npm install needed!

<script type="module">
  import alexaUtterancesTofile from 'https://cdn.skypack.dev/alexa-utterances-tofile';
</script>

README

alexa-utterances-tofile

NPM Version Build Status Coverage Status

A tiny node module to simplify the saving of an utterances object generated by the alexa-utterances module.

Installation

npm install --save-dev alexa-utterances-tofile

Usage

Using the example from alexa-utterances.

var utterances = require('alexa-utterances');
var tofile = require('alexa-utterances-tofile');

var dictionary = { adjustments: [ 'dim', 'brighten' ] };
var slots = { Adjustment: 'LITERAL' };
var template = '{adjustments|Adjustment} the light';

var result = utterances(template, slots, dictionary);

tofile.save('MyIntentName', result);

License

MIT