Last reviewed: 3/23/2024 10:35:52 AM
Generating Markup
The VoiceMarkupKit management class is designed to provide a lot of flexiblity and minimize the programming necessary to generate text-to-speech markup.
NVoiceMarkupKit _VoiceMarkupKit = new NVoiceMarkupKit();
_VoiceMarkupKit.SetCredentials("Credentials");
NW3CSSMLVoiceMarkup _W3CSSMLVoiceMarkup = _VoiceMarkupKit.CreateW3CVoiceMarkup();
string markup = _W3CSSMLVoiceMarkup.GenerateMarkup("Rate", "5", "This text is spoken above the baseline at rate of five");
CVoiceMarkupKit* _VoiceMarkupKit = new CVoiceMarkupKit();
_VoiceMarkupKit->SetCredentials(L"Credentials");
CW3CSSMLVoiceMarkup* _W3CSSMLVoiceMarkup = _VoiceMarkupKit->CreateW3CSSMLVoiceMarkup();
wchar_t* markup = _W3CSSMLVoiceMarkup->GenerateMarkup(L"Rate", L"5", L"This text is spoken above the baseline at rate of five");
CVoiceMarkupKit* _VoiceMarkupKit = new CVoiceMarkupKit();
_VoiceMarkupKit->SetCredentials("Credentials");
CW3CSSMLVoiceMarkup* _W3CSSMLVoiceMarkup = _VoiceMarkupKit->CreateW3CSSMLVoiceMarkup();
string markup = _W3CSSMLVoiceMarkup->GenerateMarkup("Rate", "5", "This text is spoken above the baseline at rate of five");
var
_VoiceMarkupKit: TVoiceMarkupKit;
_W3CSSMLVoiceMarkup: TW3CSSMLVoiceMarkup;
markup: string;
begin
_VoiceMarkupKit := TVoiceMarkupKit.Create();
_VoiceMarkupKit.SetCredentials('Credentials');
_W3CSSMLVoiceMarkup := _VoiceMarkupKit.CreateW3CSSMLVoiceMarkup();
markup = _W3CSSMLVoiceMarkup.GenerateMarkup('Rate', '5', 'This text is spoken above the baseline at rate of five');
JVoiceMarkupKit _VoiceMarkupKit = new JVoiceMarkupKit();
_VoiceMarkupKit.setCredentials("Credentials");
JW3CSSMLVoiceMarkup _W3CSSMLVoiceMarkup = _VoiceMarkupKit.createW3CSSMLVoiceMarkup();
String markup = _W3CSSMLVoiceMarkup.generateMarkup("Rate", "5", "This text is spoken above the baseline at rate of five");
Dim _VoiceMarkupKit As NVoiceMarkupKit = Nothing
Dim _W3CSSMLVoiceMarkup As NW3CSSMLVoiceMarkup = Nothing
Dim markup as String
_VoiceMarkupKit = New NVoiceMarkupKit()
_VoiceMarkupKit.SetCredentials("Credentials")
_W3CSSMLVoiceMarkup = _VoiceMarkupKit.CreateW3CVoiceMarkup()
markup = _W3CSSMLVoiceMarkup.GenerateMarkup("Rate", "5", "This text is spoken above the baseline at rate of five")
A common tag may be generated with voice-specific markup. Some common tags have unique attributes. Some tags are unique to a syntax. The following table provides a tag list for generation to serve as an index for markup quick references by syntax.
Markup Tag | Attribute(s) | Encloses Text | Markup Syntax |
---|---|---|---|
alternate | value | Yes | Acapela |
audio | source | Yes | Azure, W3C |
audio | values | Yes | Acapela |
audioboost | value | Yes | Acapela |
audioduration | value | No | Azure |
backgroundaudio | src, volume, fadein, fadeout | No | Azure |
bookmark | mark | No | Acapela, Azure, SAPI5, W3C |
colibri | value | Yes | Acapela |
comment | Yes | Azure, SAPI5, W3C | |
context | alias | Yes | SAPI5, W3C |
deemphasis | level | Yes | Acapela, Azure, W3C |
emphasis | level | Yes | Acapela, Azure, SAPI5, W3C |
equalizer | preset | Yes | Acapela |
express-as | style, styledegree | Yes | Azure |
groupof | value | Yes | Acapela |
language | lang | Yes | Azure, SAPI5, W3C |
lexicon | source | No | CereVoice, W3C |
muteable | Yes | Acapela | |
partofspeech | part | Yes | Acapela, SAPI5 |
pausemode | modes | Yes | Acapela |
pitch | inc/dec | Yes | Acapela, Azure, CereVoice, SAPI5, W3C |
pitchrange | contour | Yes | Azure, W3C |
pronunciation | alphabet, ph | Yes | Azure, SAPI5, W3C |
pronunciation | phonemes | Yes | Acapela, CereVoice |
rate | inc/dec | Yes | Acapela, Azure, CereVoice, SAPI5, W3C |
relativepitch | inc/dec | Yes | Acapela, Azure, SAPI5, W3C |
relativepitchrange | contour | Yes | Azure, W3C |
relativespeed | inc/dec | Yes | Acapela |
reset | Yes | Acapela | |
silence | amount | No | Acapela, SAPI5, W3C |
silence | type, value | No | Azure |
silence | type, time | No | CereVoice |
skip | value | Yes | Acapela |
spell | Yes | Acapela, Azure, SAPI5, W3C | |
spurt | gesureid | Yes | CereVoice |
usel | variant | Yes | CereVoice |
viseme | type | No | Azure |
voice | gender, variant | Yes | SAPI5, W3C |
voice | values | Yes | Acapela |
voice | gestureid | Yes | CereVoice |
voiceshaping | value | Yes | Acapela |
volume | inc/dec | Yes | Acapela, Azure, CereVoice, SAPI5, W3C |
warp | value | Yes | Acapela |