pub struct TtsSettings {
pub enabled: bool,
pub models_dir: Option<String>,
pub speaking_model: Option<String>,
pub voice: Option<String>,
pub language: Option<Value>,
pub max_utterance_seconds: u64,
}Expand description
Deliberately narrower than a model spec, for the same reason
crate::dictate::DictateSettings is: a hand-edited URL, byte length or
digest is how a file arrives that nothing can verify.
Fields§
§enabled: boolOff unless asked for. Turning it on makes the speaking role available; the model installs from the models page or the settings card.
models_dir: Option<String>Where the model files live. Absent uses the platform cache directory.
speaking_model: Option<String>The model the role runs. Absent uses the compiled pin; an unknown name is refused by name.
voice: Option<String>The voice every utterance renders in. Absent uses the engine’s own default; an id that is not installed is refused by name.
language: Option<Value>Ghost of the retired [tts] language hint: read only so a stale
config keeps loading. The voice id is the language choice (the 54
voices cover eight languages), so there is nothing for the key to set.
max_utterance_seconds: u64Upper bound on one utterance’s text, as a character estimate at a rough speaking pace, not one sentence.
Implementations§
Source§impl TtsSettings
impl TtsSettings
Sourcepub fn configured_variant(&self) -> Result<Option<SpeakingVariant>, String>
pub fn configured_variant(&self) -> Result<Option<SpeakingVariant>, String>
The variant a configured name selects, refusing an unknown name the
way [dictate] transcribe_model does.
Sourcepub fn models_dir(&self) -> Option<PathBuf>
pub fn models_dir(&self) -> Option<PathBuf>
Where the model files land.
Sourcepub fn voices_dir(&self) -> Option<PathBuf>
pub fn voices_dir(&self) -> Option<PathBuf>
The directory the style files live in.
Trait Implementations§
Source§impl Clone for TtsSettings
impl Clone for TtsSettings
Source§impl Debug for TtsSettings
impl Debug for TtsSettings
Source§impl Default for TtsSettings
impl Default for TtsSettings
Source§impl<'de> Deserialize<'de> for TtsSettings
impl<'de> Deserialize<'de> for TtsSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TtsSettings
impl PartialEq for TtsSettings
impl StructuralPartialEq for TtsSettings
Auto Trait Implementations§
impl Freeze for TtsSettings
impl RefUnwindSafe for TtsSettings
impl Send for TtsSettings
impl Sync for TtsSettings
impl Unpin for TtsSettings
impl UnsafeUnpin for TtsSettings
impl UnwindSafe for TtsSettings
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more