merge-ssml
v1.0.5
Published
Combine multiple SSML documents into one
Downloads
5
Readme
merge-ssml
Merge SSML documents in JavaScript
Example
Input SSML documents
<speak>
Here is the first <say-as interpret-as="characters">SSML</say-as>
</speak>
<speak>
Here is the second <say-as interpret-as="characters">SSML</say-as>
</speak>
<speak>
Here is the third <say-as interpret-as="characters">SSML</say-as>
</speak>
Resulting document
<speak>
Here is the first <say-as interpret-as="characters">SSML</say-as>
</speak>
<break />
Here is the second <say-as interpret-as="characters">SSML</say-as>
<break />
Here is the third <say-as interpret-as="characters">SSML</say-as>
</speak>
Usage
Install using npm
npm i merge-ssml
or yarn
yarn add merge-ssml
Example
// Import the package
const merge_ssml = require('merge-ssml')
// Provide SSML documents
ssmls = [
`<speak>
Here is the first <say-as interpret-as="characters">SSML</say-as>
</speak>`,
`<speak>
Here is the second <say-as interpret-as="characters">SSML</say-as>
</speak>`,
`<speak>
Here is the third <say-as interpret-as="characters">SSML</say-as>
</speak>`
]
// Combine them
const result = merge_ssml(ssmls)