SsmlNode

sealed class SsmlNode

Sealed hierarchy representing nodes in an SSML tree.

Nodes are constructed by com.github.kvnpetit.betterfrenchtts.dsl.SpeechBuilder and rendered to an XML string by SsmlRenderer.

This is an internal representation — library consumers interact with the DSL and never need to create SsmlNode instances directly.

See also

Inheritors

Types

Link copied to clipboard
data class Break(val timeMs: Int) : SsmlNode

Silence pause. Rendered as <break time="[timeMs]ms"/>.

Link copied to clipboard
data class Emphasis(val level: String = "moderate", val children: List<SsmlNode> = emptyList()) : SsmlNode

Emphasis modifier. Rendered as <emphasis level="...">.

Link copied to clipboard
data class Paragraph(val children: List<SsmlNode> = emptyList()) : SsmlNode

Paragraph wrapper. Rendered as <p>...</p>.

Link copied to clipboard
data class Phoneme(val content: String, val ph: String) : SsmlNode

Phonetic pronunciation. Rendered as <phoneme alphabet="ipa" ph="...">...</phoneme>.

Link copied to clipboard
data class Prosody(val rate: String? = null, val pitch: String? = null, val volume: String? = null, val children: List<SsmlNode> = emptyList()) : SsmlNode

Prosody modifier. Rendered as <prosody rate="..." pitch="..." volume="...">.

Link copied to clipboard
data class SayAs(val interpretAs: String, val content: String, val format: String? = null) : SsmlNode

Interpretation directive. Rendered as <say-as interpret-as="...">.

Link copied to clipboard
data class Sentence(val children: List<SsmlNode> = emptyList()) : SsmlNode

Sentence wrapper. Rendered as <s>...</s>.

Link copied to clipboard
data class Sub(val content: String, val alias: String) : SsmlNode

Substitution alias. Rendered as <sub alias="...">...</sub>.

Link copied to clipboard
data class Text(val content: String) : SsmlNode

Raw text content. Rendered as XML-escaped text.