speechmarkdown/speechmarkdown-js

Add dictionary to options for sub and phoneme

rmtuckerphx opened this issue · 1 comments

The SpeechMarkdown class or toSSML method accepts an options object. Add a dictionary element to options to allow for a dictionary of words or phrases that will be converted to a phoneme SSML tag if the platform supports it (Alexa) or a sub SSML tag otherwise (Google).

The structure would be something like this:

[
  {
    "text": "potato",
    "ipa": "pəˈteɪtəʊ",
    "sub": "poteytoh",
    "section": "food",
  }
]

See https://github.com/cellular/jovo-plugin-ssml

Need to decide if:

  • any text in the string will be checked against each item in the dictionary
  • support a dictionary Speech Markdown tag so only tagged words would be checked: (potato)[dictionary]

Could also specify a section for each word so only a subsection of the dictionary will be checked: (potato)[dictionary:"food"]

arjan commented

Closing issue due to no activity