public class Ssml
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTE_NAME |
static java.lang.String |
CLOSE_OPENING_TAG |
static java.lang.String |
CLOSE_TAG |
static java.lang.String |
FORMAT |
static java.lang.String |
INTERPRET_AS |
static java.lang.String |
OPEN_CLOSE_TAG |
static java.lang.String |
OPEN_TAG |
static java.lang.String |
PITCH |
static java.lang.String |
RATE |
static java.lang.String |
SRC |
static java.lang.String |
TAG_AMAZON_DOMAIN |
static java.lang.String |
TAG_AMAZON_EFFECT |
static java.lang.String |
TAG_AMAZON_EMOTION |
static java.lang.String |
TAG_AUDIO |
static java.lang.String |
TAG_BREAK |
static java.lang.String |
TAG_EMPHASIS |
static java.lang.String |
TAG_LANG |
static java.lang.String |
TAG_P |
static java.lang.String |
TAG_PHONEME |
static java.lang.String |
TAG_PROSODY |
static java.lang.String |
TAG_S |
static java.lang.String |
TAG_SAY_AS |
static java.lang.String |
TAG_SPEAK |
static java.lang.String |
TAG_SUB |
static java.lang.String |
TAG_VOICE |
static java.lang.String |
TAG_W |
static java.lang.String |
VOLUME |
static java.lang.String |
XML_LANG |
Constructor and Description |
---|
Ssml()
Constructor.
|
Ssml(java.lang.String text) |
Modifier and Type | Method and Description |
---|---|
Ssml |
audio(java.lang.String src)
The audio tag lets you provide the URL for an MP3 file that the Alexa service can play while rendering a response.
|
Ssml |
breakWithMilliseconds(java.lang.Integer milliseconds) |
Ssml |
breakWithSeconds(java.lang.Integer seconds) |
Ssml |
breakWithStrength(BreakStrength strength) |
java.lang.String |
build() |
Ssml |
domain(AmazonDomain domain,
java.lang.String text)
Applies different speaking styles to the speech.
|
Ssml |
effect(AmazonEffect effect,
java.lang.String text)
Applies Amazon-specific effect to the speech.
|
Ssml |
emotion(AmazonEmotion emotion,
AmazonEmotionIntensity intensity,
java.lang.String text) |
Ssml |
emphasis(java.lang.String text,
EmphasisLevel emphasisLevel) |
Ssml |
lang(java.lang.String text,
SupportedLang lang) |
Ssml |
p(java.lang.String text) |
Ssml |
paragraph(java.lang.String text) |
Ssml |
prosody(java.lang.String text,
ProsodyRate rate,
ProsodyPitch pitch,
ProsodyVolume volume) |
Ssml |
s(java.lang.String text) |
Ssml |
sayAs(java.lang.String text,
InterpretAs interpretAs,
InterpretAsDateFormat interpretAsDateFormat) |
Ssml |
sentence(java.lang.String text) |
Ssml |
speak(java.lang.String text) |
Ssml |
sub(java.lang.String text,
java.lang.String alias) |
Ssml |
text(java.lang.String text) |
Ssml |
voice(java.lang.String text,
Voice voice) |
Ssml |
w(java.lang.String text,
WordRole role) |
public static final java.lang.String ATTRIBUTE_NAME
public static final java.lang.String OPEN_TAG
public static final java.lang.String CLOSE_TAG
public static final java.lang.String OPEN_CLOSE_TAG
public static final java.lang.String CLOSE_OPENING_TAG
public static final java.lang.String INTERPRET_AS
public static final java.lang.String FORMAT
public static final java.lang.String TAG_AMAZON_DOMAIN
public static final java.lang.String TAG_AMAZON_EFFECT
public static final java.lang.String TAG_AMAZON_EMOTION
public static final java.lang.String TAG_AUDIO
public static final java.lang.String TAG_BREAK
public static final java.lang.String TAG_EMPHASIS
public static final java.lang.String TAG_LANG
public static final java.lang.String TAG_P
public static final java.lang.String TAG_PHONEME
public static final java.lang.String TAG_PROSODY
public static final java.lang.String TAG_S
public static final java.lang.String TAG_SAY_AS
public static final java.lang.String TAG_SPEAK
public static final java.lang.String TAG_SUB
public static final java.lang.String TAG_VOICE
public static final java.lang.String TAG_W
public static final java.lang.String XML_LANG
public static final java.lang.String RATE
public static final java.lang.String PITCH
public static final java.lang.String VOLUME
public static final java.lang.String SRC
public Ssml()
public Ssml(java.lang.String text)
text
- plain textpublic Ssml domain(@NonNull AmazonDomain domain, @NonNull java.lang.String text)
domain
- Name of the speaking style to apply to the speechtext
- Text to be wrapped inside the amazon:domain tagpublic Ssml audio(@NonNull java.lang.String src)
src
- Specifies the URL for the MP3 filepublic Ssml effect(@NonNull AmazonEffect effect, @NonNull java.lang.String text)
effect
- Effecttext
- text to apply the effect topublic Ssml text(@NonNull java.lang.String text)
text
- plain textpublic Ssml emotion(@NonNull AmazonEmotion emotion, @NonNull AmazonEmotionIntensity intensity, @NonNull java.lang.String text)
emotion
- The name of the emotion to apply to the speechintensity
- The intensity or strength of teh emotion to express.text
- plain text to apply emotion topublic Ssml lang(@Nonnull java.lang.String text, @NonNull SupportedLang lang)
text
- text to speak tagged as a particular langlang
- specify the language model and rules to speak the tagged contentpublic Ssml paragraph(@Nonnull java.lang.String text)
text
- text to be wrapped in a paragraphpublic Ssml prosody(@Nonnull java.lang.String text, @Nullable ProsodyRate rate, @Nullable ProsodyPitch pitch, @Nullable ProsodyVolume volume)
text
- text to be wrapped in the prosody tagrate
- Rate of Speechpitch
- Tone (pitch) of the speechvolume
- Volume of the Speechpublic Ssml sentence(@Nonnull java.lang.String text)
text
- Text to be wrapped in a sentence tag (s)public Ssml speak(@Nonnull java.lang.String text)
text
- Text to be wrapped in speak tagpublic Ssml s(@Nonnull java.lang.String text)
text
- Text to be wrapped in a sentence tag (s)public Ssml p(@Nonnull java.lang.String text)
text
- Text to be wrapped in a paragraph tagpublic Ssml sayAs(@Nonnull java.lang.String text, @NonNull InterpretAs interpretAs, @Nullable InterpretAsDateFormat interpretAsDateFormat)
text
- text to be wrapped in a say as taginterpretAs
- Indicate alexa how to interpret textinterpretAsDateFormat
- Format to be used when interpret-as is set to date.public Ssml w(@Nonnull java.lang.String text, @NonNull WordRole role)
text
- Text to be wrappedrole
- Specify role of the wordpublic Ssml emphasis(@Nonnull java.lang.String text, @Nullable EmphasisLevel emphasisLevel)
text
- Text to be emphasizedemphasisLevel
- Emphasis levelpublic Ssml breakWithSeconds(@NonNull java.lang.Integer seconds)
seconds
- duration of break in secondspublic Ssml voice(@NonNull java.lang.String text, @NonNull Voice voice)
text
- text to be spoken in a particular voicevoice
- Amazon Polly voice to speak the text withpublic Ssml sub(@NonNull java.lang.String text, @NonNull java.lang.String alias)
text
- text to be pronouced differentlyalias
- pronunciation to substitutepublic Ssml breakWithMilliseconds(@NonNull java.lang.Integer milliseconds)
milliseconds
- duration of break in millisecondspublic Ssml breakWithStrength(@NonNull BreakStrength strength)
strength
- Break strengthpublic java.lang.String build()