pub struct AppConfig {Show 17 fields
pub default_model: String,
pub language: String,
pub session_dir: String,
pub hop_ms: u32,
pub min_window_ms: u32,
pub engine_prefer: String,
pub audio_default_source: String,
pub input_device: Option<String>,
pub input_device_kind: Option<AudioSessionKind>,
pub last_app_id: Option<String>,
pub refinement_model: Option<String>,
pub refinement_window_ms: u32,
pub refinement_beam_size: u8,
pub voicebird_api_key: String,
pub voicebird_server_url: String,
pub cloud_broadcast_enabled: bool,
pub source_overrides: BTreeMap<String, SourceSettingsOverride>,
}Fields§
§default_model: String§language: String§session_dir: String§hop_ms: u32§min_window_ms: u32§engine_prefer: String§audio_default_source: String§input_device: Option<String>Device name chosen by the user. None = use the OS default
input. Missing-from-config (old configs) deserializes to None.
input_device_kind: Option<AudioSessionKind>Kind of the saved device. None for old configs / default input.
Lets start_recording pick the right capture path without having
to re-enumerate and match by name first.
last_app_id: Option<String>Last app the picker’s Apps pane was on. None = no app paired.
Bundle id (macOS) or PID-stringified value (Windows). Restored at
next launch so the user’s app cursor lands where they left it.
refinement_model: Option<String>Optional background refinement model. When set, a second whisper
engine runs in parallel on wider non-overlapping windows with beam
search and emits higher-quality segments that replace the streaming
output in the UI. None disables refinement.
refinement_window_ms: u32Window length (ms) of audio fed to each refinement pass.
refinement_beam_size: u8Beam size for refinement. 1 = greedy (fastest, lowest quality).
voicebird_api_key: StringVoice Bird Web API key. Stored in plaintext in config.toml — file permissions are the only protection. Empty string = unset.
voicebird_server_url: StringWebSocket URL of the Voice Bird Web /api/audio/stream endpoint
the desktop client streams to when cloud_broadcast_enabled is
true. Defaults to the hosted production server.
cloud_broadcast_enabled: boolWhen true, recordings stream PCM to voicebird_server_url and
transcripts are produced by the cloud model. The local Whisper
engine is bypassed and no session files are written to disk —
the recording lives entirely on the user’s voicebird.app
account. When false (default), the local engine runs and writes
~/voice-bird/sessions/<ts>/.
source_overrides: BTreeMap<String, SourceSettingsOverride>Per-source setting overrides. Key is the result of source_id
or device_source_id; value carries the cloud/language/model
to use when starting a section for that source. When absent for
a given source, [effective_settings] falls back to the global
fields above.
Implementations§
Source§impl AppConfig
impl AppConfig
pub fn config_path() -> Result<PathBuf>
pub fn load() -> Result<Self>
pub fn save(&self) -> Result<()>
pub fn load_from(path: &Path) -> Result<Self>
pub fn save_to(&self, path: &Path) -> Result<()>
pub fn session_dir_expanded(&self) -> String
Sourcepub fn effective_override(&self, key: &str) -> SourceSettingsOverride
pub fn effective_override(&self, key: &str) -> SourceSettingsOverride
Effective per-source settings: the saved override for key if
present, else the global defaults from this config. The returned
override carries the cloud_on, language, model triple a
section actually uses at start time.
Sourcepub fn upsert_source_override(
&mut self,
key: String,
ov: SourceSettingsOverride,
)
pub fn upsert_source_override( &mut self, key: String, ov: SourceSettingsOverride, )
Convenience: persist or update one source’s override and save.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
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>,
impl StructuralPartialEq for AppConfig
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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
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>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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