jovo-plugin-ssml
v1.1.0
Published
Jovo plugin to use an alternative SpeechBuilder
Downloads
3
Readme
Advanced SSML features for the Jovo Framework
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