https://github.com/cellular/jovo-plugin-ssml
Jovo Plugin to supercharge the SpeechBuilder
https://github.com/cellular/jovo-plugin-ssml
Last synced: about 1 year ago
JSON representation
Jovo Plugin to supercharge the SpeechBuilder
- Host: GitHub
- URL: https://github.com/cellular/jovo-plugin-ssml
- Owner: cellular
- Created: 2018-06-04T12:17:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-05T09:51:46.000Z (about 8 years ago)
- Last Synced: 2025-02-15T11:19:51.110Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advanced SSML features for the Jovo Framework
[](https://travis-ci.org/cellular/jovo-plugin-ssml)
[Jovo](https://www.jovo.tech/) [Plugin](https://www.jovo.tech/docs/advanced#plugins) to [supercharge](http://github.com/cellular/speech-builder) the SpeechBuilder:
* Lexicon to automatically insert `` or `` 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](http://github.com/cellular/speech-builder#api) for details.
## Usage
```js
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
```js
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