ssml-builder icon indicating copy to clipboard operation
ssml-builder copied to clipboard

configuration to take array as a input and user random item from array for ssml building.

Open itachiRedhair opened this issue 5 years ago • 0 comments

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:

  1. 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 in Speech() constructor to allow random picking for array types.

itachiRedhair avatar Aug 10 '18 10:08 itachiRedhair