public class SsmlBuilder
Helper class for construction of SSML https//www.w3.org/TR/speech-synthesis11/ based responses. This Helper only contain the supported SSML tags for Amazon Alexa and the Google Assistant.
| Modifier and Type | Class and Description |
|---|---|
static class |
SsmlBuilder.Companion |
| Modifier and Type | Field and Description |
|---|---|
static SsmlBuilder.Companion |
Companion |
| Constructor and Description |
|---|
SsmlBuilder(java.lang.String text)
Helper class for construction of SSML https//www.w3.org/TR/speech-synthesis11/ based responses.
This Helper only contain the supported SSML tags for Amazon Alexa and the Google Assistant.
|
SsmlBuilder()
Helper class for construction of SSML https//www.w3.org/TR/speech-synthesis11/ based responses.
This Helper only contain the supported SSML tags for Amazon Alexa and the Google Assistant.
|
| Modifier and Type | Method and Description |
|---|---|
SsmlBuilder |
appendAlexaSpeechcon(java.lang.String speechcon)
This will add a
|
SsmlBuilder |
appendAlexaSpeechconRandom(java.lang.String speechcons)
This will add a
|
SsmlBuilder |
appendAmazonEffect(java.lang.String text,
AmazonEffect amazonEffect)
This will add the <> https//developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#amazon-effect
tag with the
enum AmazonEffect to a given string. |
SsmlBuilder |
appendAudio(java.lang.String url)
This will add the https//www.w3.org/TR/speech-synthesis11/#S3.3.1 tag with the given URL.
|
SsmlBuilder |
appendBreak(Strength strength,
java.lang.Integer timeInMs)
This will add the https//www.w3.org/TR/speech-synthesis11/#S3.2.3 tag to the SSML string.
You can either choose to set a
enum Strength, a time in milliseconds or the default for the break. |
SsmlBuilder |
appendEmphasis(Emphasis emphasis,
java.lang.String text)
This will add the https//www.w3.org/TR/speech-synthesis11/#S3.2.2 tag with the attribute
enum Emphasis to a given string. |
SsmlBuilder |
appendRandomOf(java.lang.String text)
This will randomly append one of the given strings to this
class SsmlBuilder |
SsmlBuilder |
appendRandomSpeechOf(java.lang.String text) |
SsmlBuilder |
appendSayAs(InterpretAs interpretAs,
java.lang.String text)
This will add the
enum InterpretAs to a given string. |
SsmlBuilder |
appendSlowText(java.lang.String text)
This will add the tag https//www.w3.org/TR/speech-synthesis11/#S3.2.3 to the
given string.
|
SsmlBuilder |
appendSpeech(java.lang.String text) |
SsmlBuilder |
appendSubAlias(java.lang.String text,
java.lang.String alias)
This will add a https//www.w3.org/TR/speech-synthesis11/#S3.1.11 tag with the given
text and alias.
|
SsmlBuilder |
appendText(java.lang.String text)
This will add more text to the
class SsmlBuilder |
SsmlBuilder |
appendText(SsmlBuilder text)
This will add an other
class SsmlBuilder to this one. |
java.lang.String |
asDisplayText()
Returns the containing string without any SSML tags.
|
java.lang.String |
asSsmlString()
Returns the containing string with a start and end tag.
|
SsmlBuilder |
plus(java.lang.String text)
This will add more text to the
class SsmlBuilder |
SsmlBuilder |
plus(SsmlBuilder text)
This will add an other
class SsmlBuilder to this one. |
java.lang.String |
toString()
Returns the containing string.
|
public static SsmlBuilder.Companion Companion
public SsmlBuilder(java.lang.String text)
Helper class for construction of SSML https//www.w3.org/TR/speech-synthesis11/ based responses. This Helper only contain the supported SSML tags for Amazon Alexa and the Google Assistant.
public SsmlBuilder()
Helper class for construction of SSML https//www.w3.org/TR/speech-synthesis11/ based responses. This Helper only contain the supported SSML tags for Amazon Alexa and the Google Assistant.
public SsmlBuilder appendBreak(Strength strength, java.lang.Integer timeInMs)
This will add the https//www.w3.org/TR/speech-synthesis11/#S3.2.3 tag to the SSML string.
You can either choose to set a enum Strength, a time in milliseconds or the default for the break.
public SsmlBuilder appendSlowText(java.lang.String text)
This will add the tag https//www.w3.org/TR/speech-synthesis11/#S3.2.3 to the given string.
public SsmlBuilder appendAudio(java.lang.String url)
This will add the https//www.w3.org/TR/speech-synthesis11/#S3.3.1 tag with the given URL.
public SsmlBuilder appendSayAs(InterpretAs interpretAs, java.lang.String text)
This will add the enum InterpretAs to a given string.
public SsmlBuilder appendEmphasis(Emphasis emphasis, java.lang.String text)
This will add the https//www.w3.org/TR/speech-synthesis11/#S3.2.2 tag with the attribute
enum Emphasis to a given string.
public SsmlBuilder appendAmazonEffect(java.lang.String text, AmazonEffect amazonEffect)
This will add the <> https//developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#amazon-effect
tag with the enum AmazonEffect to a given string.
public SsmlBuilder appendAlexaSpeechcon(java.lang.String speechcon)
This will add a
public SsmlBuilder appendAlexaSpeechconRandom(java.lang.String speechcons)
This will add a
public SsmlBuilder appendText(java.lang.String text)
This will add more text to the class SsmlBuilder
class SsmlBuilderpublic SsmlBuilder appendText(SsmlBuilder text)
This will add an other class SsmlBuilder to this one.
class SsmlBuilderpublic SsmlBuilder plus(java.lang.String text)
This will add more text to the class SsmlBuilder
class SsmlBuilderpublic SsmlBuilder plus(SsmlBuilder text)
This will add an other class SsmlBuilder to this one.
class SsmlBuilderpublic SsmlBuilder appendRandomOf(java.lang.String text)
This will randomly append one of the given strings to this class SsmlBuilder
class SsmlBuilderpublic SsmlBuilder appendSubAlias(java.lang.String text, java.lang.String alias)
This will add a https//www.w3.org/TR/speech-synthesis11/#S3.1.11 tag with the given text and alias.
public SsmlBuilder appendSpeech(java.lang.String text)
public SsmlBuilder appendRandomSpeechOf(java.lang.String text)
public java.lang.String asDisplayText()
Returns the containing string without any SSML tags.
public java.lang.String toString()
Returns the containing string.
public java.lang.String asSsmlString()
Returns the containing string with a start and end tag.