Skip to main content

DictateSettings

Struct DictateSettings 

Source
pub struct DictateSettings {
Show 13 fields pub enabled: bool, pub models_dir: Option<String>, pub device: Option<Value>, pub transcribe_model: Option<String>, pub cleanup_model: Option<String>, pub language: Option<String>, pub normalizer: bool, pub max_capture_minutes: u64, pub bind: DictateBind, pub mode: DictateMode, pub styling: Option<Styling>, pub structure: Option<Structure>, pub context: Option<Context>,
}
Expand description

The [dictate] section. Every field has a default, so an absent section is exactly enabled = false.

Deliberately narrower than forge_dictate::Config. A model spec carries a URL, a byte length and a digest, and hand-editing one is how a file arrives that nothing can verify. The normalizer’s three prompt axes are permissions rather than instructions - they say what the model MAY change, not what it must - so exposing them means flipping one, seeing no difference, and concluding it is broken.

Fields§

§enabled: bool

Off unless asked for: turning it on costs a 3.07 GB download the first time and holds about 1.8 GB of physical footprint for the run.

§models_dir: Option<String>

Where the model files live. Absent uses the platform cache directory.

§device: Option<Value>

Ghost of the retired [dictate] device pin: read only so a stale forge.toml still carrying it warns at load instead of being refused as an unknown key. Capture moved to the client, which picks its own machine’s input, so nothing reads this.

§transcribe_model: Option<String>

The model the transcribing role runs, as the feed’s own variant name. Set, it wins over every runtime pick and refuses Activate for the role; absent leaves the role to the last pick or the compiled pin.

§cleanup_model: Option<String>

The model the cleanup role runs, by feed variant name, under the same rule as Self::transcribe_model. Inert while Self::normalizer is off.

§language: Option<String>

Spoken language hint. Absent autodetects.

§normalizer: bool

Rewrite recognition output into clean text. Off halves the download and skips a pass per utterance.

§max_capture_minutes: u64

Upper bound on a single recording. A capture nobody stops ends itself here rather than holding the seat indefinitely.

§bind: DictateBind

The push-to-talk key.

§mode: DictateMode

How press/release maps onto starting and stopping a take.

§styling: Option<Styling>

The register a take’s cleanup rewrites into, where a client has not chosen its own. Absent means the crate’s default.

§structure: Option<Structure>

Whether the cleanup may return a bulleted list. Absent means the crate’s default.

§context: Option<Context>

What the words are being written for. Absent means the crate’s default.

Implementations§

Source§

impl DictateSettings

Source

pub fn axes(&self) -> DictateAxes

The axes in force: what forge.toml sets, and the crate’s own default wherever it sets nothing. This is what a client reads as the values it starts on and resets to.

Source

pub(crate) fn to_config(&self) -> Config

The engine configuration these settings describe.

Source

pub(crate) fn models_dir(&self) -> Option<PathBuf>

Where the model files land. Preflight says it while fetching, because cancelling keeps what has arrived and a reader needs to know where.

Source

pub(crate) fn model_specs(&self) -> Vec<(DictateRole, ModelSpec)>

The model each role runs, in role order: the pins plus the roles they run as. The one place the pair is spelled, so preflight’s rows and the models page’s IN USE rows cannot disagree about which models forge runs.

Source

pub(crate) fn pin_active(&self) -> Vec<(DictateRole, ActiveModel)>

The compiled pins as active models: what every role runs before any resolution has landed, and what a role with no key and no runtime pick keeps running.

Source

fn initial_models(&self) -> Vec<DictateModel>

The rows preflight draws before any work has started.

Trait Implementations§

Source§

impl Clone for DictateSettings

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DictateSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DictateSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DictateSettings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for DictateSettings

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DictateSettings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

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

fn in_current_span(self) -> Instrumented<Self> ⓘ

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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