pub struct SpeakOptions {
pub rate: Option<f32>,
pub speech_rate: Option<SpeechRate>,
pub pitch: Option<f32>,
pub speech_pitch: Option<SpeechPitch>,
pub volume: Option<f32>,
pub voice: Option<String>,
pub format: Option<AudioFormat>,
pub use_speech_markdown: bool,
pub use_word_boundary: bool,
pub raw_ssml: bool,
pub extra: HashMap<String, String>,
}Expand description
Options for speak/synth calls, matching Swift’s SpeakOptions.
Fields§
§rate: Option<f32>Speech rate as a float multiplier (1.0 = normal). Overrides speech_rate.
speech_rate: Option<SpeechRate>Speech rate as a named preset.
pitch: Option<f32>Speech pitch as a float multiplier (1.0 = normal). Overrides speech_pitch.
speech_pitch: Option<SpeechPitch>Speech pitch as a named preset.
volume: Option<f32>Volume (0.0–1.0).
voice: Option<String>Voice identifier.
format: Option<AudioFormat>Desired audio output format.
use_speech_markdown: boolWhether to preprocess SpeechMarkdown to SSML.
use_word_boundary: boolWhether to request real word boundary events from the API.
raw_ssml: boolIf true, pass SSML directly to the engine without wrapping.
extra: HashMap<String, String>Engine-specific extra options.
Implementations§
Source§impl SpeakOptions
impl SpeakOptions
Sourcepub fn effective_rate(&self) -> f32
pub fn effective_rate(&self) -> f32
Resolve the effective rate value.
Sourcepub fn effective_pitch(&self) -> f32
pub fn effective_pitch(&self) -> f32
Resolve the effective pitch value.
Sourcepub fn effective_volume(&self) -> f32
pub fn effective_volume(&self) -> f32
Resolve the effective volume value.
Trait Implementations§
Source§impl Clone for SpeakOptions
impl Clone for SpeakOptions
Source§fn clone(&self) -> SpeakOptions
fn clone(&self) -> SpeakOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpeakOptions
impl Debug for SpeakOptions
Source§impl Default for SpeakOptions
impl Default for SpeakOptions
Source§fn default() -> SpeakOptions
fn default() -> SpeakOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpeakOptions
impl RefUnwindSafe for SpeakOptions
impl Send for SpeakOptions
impl Sync for SpeakOptions
impl Unpin for SpeakOptions
impl UnsafeUnpin for SpeakOptions
impl UnwindSafe for SpeakOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more