Methods
(static) addMarksToUnmarkedSentences(text, marks) → {string}
Returns a new string with a random SSML mark inserted at each sentence that
does not already contain an SSML mark.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Input string. |
marks |
Array.<string> | Any array of random SSML marks to choose from |
Returns:
- Type
- string
(static) autoGenerateSSMLMarks(text, map, randomMarksopt) → {string}
Returns a new string with SSML marks inserted based on
matches between the input string and the input map. The
word matches are case-insensitive. Words within existing
SSML tags will not be affected. Input text will be surrounded
by
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
text |
string | Input string. |
||
map |
object | Input object that maps mark keys { |
||
randomMarks |
Array.<string> |
<optional> |
[] | If there are sentences that don't |
Returns:
- Updated input string.
- Type
- string
(static) validateText(text) → {string}
Generate a version of given text that is enclosed by Polly ssml speak tags.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | The text to validate. |
Returns:
- Updated input string.
- Type
- string