jovo-plugin-ssml

1.1.0 • Public • Published

Advanced SSML features for the Jovo Framework

Build Status

Jovo Plugin to supercharge the SpeechBuilder:

  • Lexicon to automatically insert <phoneme> or <sub> tags.
  • Different base URI per platform to load audio files in different formats.
  • Proper XML escaping.

⚠️ NOTE: The API is not backwards compatible (though very similar) to Jovo's built-in SpeechBuilder. Please refer to the API docs for details.

Usage

const { App } = require('jovo-framework');
const SsmlPlugin = require('jovo-plugin-ssml');
 
const app = new App();
app.register('SsmlPlugin', new SsmlPlugin());
 
app.setHandler({
  LAUNCH() {
    this.tell(
      this.speech.add('You say potato, I say patata.')
    );
  }

Advanced Options

See: https://github.com/cellular/speech-builder#advanced-options

new SsmlPlugin({
  lexicon: {
    potato: {
      ipa: 'pəˈteɪtəʊ',
      sub: 'poteytoh'
    }
  },
  alexa: {
    base: 'https://example.com/audio/16k/'
  },
  google: {
    base: 'https://example.com/audio/24k/'
  }
});

License

MIT

Dependencies (1)

Dev Dependencies (3)

Package Sidebar

Install

npm i jovo-plugin-ssml

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

3.65 kB

Total Files

6

Last publish

Collaborators

  • fgnass