ssml-builder
ssml-builder copied to clipboard
configuration to take array as a input and user random item from array for ssml building.
Current version has Speech.prototype.sayRandomChoice
for random picking from array of strings.
But say I want to pass an array to Speech.prototype.sentence
and get random item wrapped around <s>
tag, I won't be able to do it in this case. I propose some changes:
- Allow passing of an array of strings to every builder function, if
saying
parameter is an array, just pick random word from it and wrap it with particular ssml tag of that builder. 2.(Optional) You can provide a configuration inSpeech()
constructor to allow random picking for array types.