merge-ssml

1.0.5 • Public • Published

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)

Readme

Keywords

Package Sidebar

Install

npm i merge-ssml

Homepage

ushaflow.com

Weekly Downloads

9

Version

1.0.5

License

MIT

Unpacked Size

3.92 kB

Total Files

5

Last publish

Collaborators

  • mishushakov