TTS markup
TTS markup grants the ability to control speech synthesis using special characters and SIL tags. This helps make synthesized speech more natural.
TTS markup is supported for Russian in the API v3 and API v1 for data in text
format.
Pausing is available for testing in all languages the speech synthesis is supported for.
Note
SpeechKit is designed for natural speech synthesis. Marking up data for speech synthesis helps set up pronunciation of separate words, phrases, and sentences. However, it is not intended for generating separate sounds and silence.
The markup in the text will serve as a cue for synthesis, not as a direct instruction.
Markup components
Description | Special characters and tags |
---|---|
Apply stress | + |
Explicitly define a pause between sentences | sil<[t]> , where t is the pause duration in milliseconds. |
Set a pause depending on the context | <[small]> . Acceptable values: tiny , small , medium , large , and huge . |
Place emphasis | <[accented]> or **accented word** |
Use phonetic pronunciation | [[ <word_phonemes_separated_by_spaces> ]] |
Warning
When using pattern-based synthesis, the markup outside the variable part is ignored.
Mark the stress
Currently, this feature works only for Russian.
Use +
before a stressed vowel any time you need to define the correct way to pronounce a word. Here is an example:
They signed the c+ontract the following day.
or
If you contr+act malaria, you will have to spend a long time in a hospital.
Set a pause between sentences explicitly
To explicitly define a pause between sentences, you can add a special tag, sil<[t]>
, where t
is the pause duration in milliseconds:
Stop. sil<[300]> Think about it!
Note
Text to synthesize may not contain markup characters only. You cannot use SpeechKit to generate a file with silence instead of speech.
Pauses set at the beginning and end of a sentence will be ignored.
Set a pause depending on the context
Use cue words to automatically select the duration of pauses.
Frost and sun; <[medium]> a wonderful day!
Place emphasis
Currently, this feature works only for Russian.
To place emphasis on a word, you can prepend it with the <[accented]>
tag. For example:
Convenient interfaces to troubleshoot <[accented]> issues.
You can also use asterisks to place emphasis on one or more words (**word**
). For example:
We are **forever** responsible for what we have tamed.
Use phonetic pronunciation
Tag text with [[ ]]
to ensure proper pronunciation using phonemes. The following tagged text will be used for playback:
Hello, My name is [[v a sʲ ʌ]]
You can find the list of supported phonemes here.