Struct ibm_watson::tts::PronunciationOptions[][src]

pub struct PronunciationOptions<'a> {
    pub format: PhonemeFormat,
    pub text: &'a str,
    pub voice: AvailableVoices,
}
Expand description

Pronunciation options to be passed to pronunciation.

Fields

format: PhonemeFormat

The PhonemeFormat to be used in pronunciation.

text: &'a str

The text to be used in pronunciation.

voice: AvailableVoices

The voice (ideally of the same language) to use in getting pronunciation Voices

Implementations

Creates a new pronunciation definition.

Arguments
  • format - the format to be used in the request for pronunciation.
  • text - pronunciation query.
  • voice - the AvailableVoices to use, ideally of the same language as the query.
Examples
let mut options = PronunciationOptions::new(
                PhonemeFormat::default(),
                "aujourd-hui",
                AvailableVoices::fr_FR_Renee,
              );

Updates the pronunciation query.

Arguments
  • text - new pronunciation query.
Examples
 options.set_text("bonjour");

Updates the voice used in pronunciation query.

Arguments
Examples
 options.set_voice(AvailableVoices::fr_FR_NicolasV3);

Updates the format used in pronunciation query.

Arguments
Examples
 options.set_format(PhonemeFormat::IBM);

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more