1.0.5 • Published 4 years ago

merge-ssml v1.0.5

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

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)
1.0.5

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago