Expand description
Utilities for writing SSML documents.
The root document in SSML is Speak
. Use speak()
to quickly create a document.
let doc = ssml::speak(Some("en-US"), ["Hello, world!"]);
Use Serialize
to convert SSML elements to their string XML representation, which can then be sent to your speech
synthesis service of chocie.
use ssml::Serialize;
let str = doc.serialize_to_string(ssml::Flavor::AmazonPolly)?;
assert_eq!(str, r#"<speak xml:lang="en-US">Hello, world!</speak>"#);
Modules
- Elements exclusive to
Flavor::MicrosoftAzureCognitiveSpeechServices
(ACSS/MSTTS). - Utilities for serializing XML.
- Walk through all elements of an SSML document.
Structs
Audio
supports the insertion of recorded audio files and the insertion of other audio formats in conjunction with synthesized speech output.- A string representation of a signed amplitude offset in decibels (
dB
). - An
Element
that outputs a string of XML. - The root element of an SSML document.
- A non-marked-up string of text for use as a spoken element.
- A time designation is a representation of a non-negative offset of time.
- The
Voice
element allows you to specify a voice or use multiple different voices in one document. - Configuration for the
Voice
element.
Enums
- Specify repeating an
Audio
element’s playback for a certain number of times, or for a determined duration. - Vendor-specific flavor of SSML. Specifying this can be used to enable compatibility checks & add additional metadata required by certain services.
Traits
- Trait to support serializing SSML elements.