pub struct SpeakAttributes {
pub lang: Option<String>,
pub base: Option<String>,
pub on_lang_failure: Option<OnLanguageFailure>,
pub version: String,
pub xml_root_attrs: BTreeMap<String, String>,
}
Expand description
The Speech Synthesis Markup Language is an XML application. The root element is speak.
N.B. According to the standard version is a required attribute, however we haven’t found any TTS providers that enforce that rule so implement a laxer parsing for compatibility with the wider ecosystem.
“Speech Synthesis Markup Language (SSML) Version 1.1” Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved.
Fields§
§lang: Option<String>
Lang is an attribute specifying the language of the root document. In the specification this is a REQUIRED attribute, however in reality most TTS APIs require a different way to specify the language outside of SSML and treat this as optional. Because of that this implementation has chosen to be more permissive than the spec.
base: Option<String>
Base is an OPTIONAL attribute specifying the Base URI of the root document.
on_lang_failure: Option<OnLanguageFailure>
On Language Failure is an OPTIONAL attribute specifying the desired behavior upon language speaking failure.
version: String
The version attribute is a REQUIRED attribute that indicates the version of the specification to be used for the document and MUST have the value “1.1”.
xml_root_attrs: BTreeMap<String, String>
for remaining attributes on root like namespace etc
Trait Implementations§
Source§impl Clone for SpeakAttributes
impl Clone for SpeakAttributes
Source§fn clone(&self) -> SpeakAttributes
fn clone(&self) -> SpeakAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more