Paragraph and Sentence
The <p>
(paragraph) and <s>
(sentence) tags in SSML are instrumental in structuring the content to aid in text-to-speech (TTS) synthesis, providing better control over how the TTS engine delivers your content audibly.
Utilizing the <p>
Tag
<p>
TagThe <p>
tag divides paragraphs, creating a clear structure within your content. This organization is key in breaking up extensive text into manageable, coherent blocks, improving the listening experience. Here's an example:
The TTS engine will pause between paragraphs, much like a human speaker would, bringing a natural rhythm to the speech.
Utilizing the <s>
Tag
<s>
TagThe <s>
tag is utilized for individual sentences within paragraphs. This is crucial when you're dealing with longer sentences that could benefit from a brief pause to improve understanding. Consider the following:
Best Practices
Non-Mandatory but Beneficial: While
<p>
and<s>
tags are not required in SSML, their usage is recommended to improve the clarity and flow of speech output.Strategic Use: Implement these tags thoughtfully. Overuse can lead to unnatural pauses and disrupt the flow of information.
Testing for Naturalness: Always preview the speech output to ensure that the placement of
<p>
and<s>
tags produces a natural and listener-friendly experience.
Last updated