actions-on-google-speech-markdown-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Speech Markdown Actions on Google plugin

This plugin makes it easier to use Speech Markdown in the Actions on Google library.

Currently, plugin supports only Actions built with Dialogflow.

NPM Version

Setup Instructions

Install the plugin with npm install actions-on-google-speech-markdown-plugin.

Usage

This plugin overrides the methods conv.ask and conv.close to parse speech markdown content if the response type is a string. If the string is plain text, the parser should not make any changes.

const { dialogflow } = require('actions-on-google')
const { speechMarkdownHelper } = require('actions-on-google-speech-markdown-plugin')
 
const app = dialogflow()
    .use(speechMarkdownHelper())
 
app.intent('Default Welcome Intent', conv => {
    const markdown = `Sample [3s] speech [250ms] markdown`;
    conv.ask(markdown)
    // Should output
    // "<speak>Sample <break time="3s"/> speech <break time="250ms"/> markdown</speak>"
})

References & Issues

Make Contributions

Please read and follow the steps in the CONTRIBUTING.md.

License

See LICENSE.

Terms

Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the Google APIs Terms of Service.

Readme

Keywords

none

Package Sidebar

Install

npm i actions-on-google-speech-markdown-plugin

Weekly Downloads

3

Version

1.0.1

License

Apache-2.0

Unpacked Size

18.9 kB

Total Files

11

Last publish

Collaborators

  • assistant