1.0.1 • Published 6 years ago

ssml-toolbox v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

SSML Tooling

My personnal SSML Toolbox, first attempt.

You're very welcome to contribute!

Installation

As usual:

npm install ssml-toolbox --save

Usage

'use strict';
// First, get and instantiate the builder, and the tag constructing methods if you need some
// Here we took the specific Google builder.
const { GoogleSsmlBuilder, s, media, speak } = require('ssml-toolbox');
const builder = new GoogleSsmlBuilder();
// You can use is basically to have some text
const ssml = builder.say('Hello world!').toString();
// Outputs: "Hello world!"

// Or you can use all the methods
const ssml2 = builder
    .say('This is a new test')
    .addBreakTag('500ms')
    .addP([s('One sentence'), s('Two sentences')])
    .addAudio('http://fake.url', 'This will not play...')
    .addSayAs('2018-03-10', 'date', {format: 'yyyymmdd'})
    .addP('Wow, paragraph!')
    // Google specific tag
    .addPar([media(speak('fake')), media(speak('test'))])
    .toString(true)
;
// Ouputs: 
// <speak>This is a new test<break time="500ms"/> \
// <p><s>One sentence</s><s>Two sentences</s></p> \
// <audio src="http://fake.url">This will not play...</audio> \
// <say-as interpret-as="date" format="yyyymmdd">2018-03-10</say-as> \
// <p>Wow, paragraph!</p></speak>

APIS:

1.0.1

6 years ago

1.0.0

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago