pub struct AurumEngine { /* private fields */ }Expand description
Library-facing engine: validated config + owned governor/metrics/model pools + registry.
Implementations§
Source§impl AurumEngine
impl AurumEngine
Sourcepub fn new(config: ValidatedConfig) -> Self
pub fn new(config: ValidatedConfig) -> Self
Build from an already-validated config with default governor settings.
Sourcepub fn with_governor(
config: ValidatedConfig,
gov: GovernorConfig,
) -> Result<Self>
pub fn with_governor( config: ValidatedConfig, gov: GovernorConfig, ) -> Result<Self>
Build with an explicit governor profile (mobile/server/custom).
Validates gov before construction (JOE-1917 / F-004).
Sourcepub fn with_governor_and_registry(
config: ValidatedConfig,
gov: GovernorConfig,
registry: ProviderRegistry,
) -> Result<Self>
pub fn with_governor_and_registry( config: ValidatedConfig, gov: GovernorConfig, registry: ProviderRegistry, ) -> Result<Self>
Build with an explicit governor and provider registry (tests / embedders).
Sourcepub fn load_from_required(path: &Path) -> Result<Self>
pub fn load_from_required(path: &Path) -> Result<Self>
Load from an explicit config file path (must exist).
Sourcepub fn from_config(cfg: Config) -> Result<Self>
pub fn from_config(cfg: Config) -> Result<Self>
Validate a raw Config and wrap it.
pub fn config(&self) -> &Config
pub fn validated_config(&self) -> &ValidatedConfig
pub fn governor(&self) -> &Arc<ResourceGovernor> ⓘ
pub fn metrics(&self) -> &Arc<Metrics> ⓘ
pub fn stt_pool(&self) -> &Arc<SttContextPool> ⓘ
pub fn tts_pool(&self) -> &Arc<TtsSessionPool> ⓘ
Sourcepub fn registry(&self) -> &ProviderRegistry
pub fn registry(&self) -> &ProviderRegistry
Immutable provider registry owned by this engine (JOE-1938).
pub fn is_closed(&self) -> bool
Sourcepub fn build_context_for(&self, id: &ProviderId) -> Result<ProviderBuildContext>
pub fn build_context_for(&self, id: &ProviderId) -> Result<ProviderBuildContext>
Assemble a single-provider build context from engine config + pools (JOE-1938).
Secrets are scoped to id only via Config::provider_secret.
Sourcepub fn build_context_for_with(
&self,
id: &ProviderId,
opts: ProviderResolveOptions,
) -> Result<ProviderBuildContext>
pub fn build_context_for_with( &self, id: &ProviderId, opts: ProviderResolveOptions, ) -> Result<ProviderBuildContext>
Build context with optional CLI/library overrides.
Sourcepub fn stt_provider(
&self,
id: &ProviderId,
) -> Result<Arc<dyn TranscriptionProvider>>
pub fn stt_provider( &self, id: &ProviderId, ) -> Result<Arc<dyn TranscriptionProvider>>
Construct an STT provider via the engine registry (JOE-1938).
pub fn stt_provider_with( &self, id: &ProviderId, opts: ProviderResolveOptions, ) -> Result<Arc<dyn TranscriptionProvider>>
Sourcepub fn tts_provider(
&self,
id: &ProviderId,
) -> Result<Arc<dyn SynthesisProvider>>
pub fn tts_provider( &self, id: &ProviderId, ) -> Result<Arc<dyn SynthesisProvider>>
Construct a TTS provider via the engine registry (JOE-1938).
pub fn tts_provider_with( &self, id: &ProviderId, opts: ProviderResolveOptions, ) -> Result<Arc<dyn SynthesisProvider>>
Sourcepub fn stt_provider_id(&self) -> Result<ProviderId>
pub fn stt_provider_id(&self) -> Result<ProviderId>
Parse config STT provider string to ProviderId.
Sourcepub fn tts_provider_id(&self) -> Result<ProviderId>
pub fn tts_provider_id(&self) -> Result<ProviderId>
Parse config TTS provider string to ProviderId.
Sourcepub fn local_whisper(&self) -> Result<LocalWhisperProvider>
pub fn local_whisper(&self) -> Result<LocalWhisperProvider>
Local STT provider bound to this engine’s pool and governor (JOE-1784).
Prefer Self::stt_provider with ProviderId::local for new code.
Sourcepub fn local_tts(&self) -> Result<LocalTtsProvider>
pub fn local_tts(&self) -> Result<LocalTtsProvider>
Local TTS provider bound to this engine’s pool and governor (JOE-1784).
Sourcepub async fn transcribe(
&self,
input: &AudioInput,
options: &TranscriptionOptions,
) -> Result<TranscriptionResult>
pub async fn transcribe( &self, input: &AudioInput, options: &TranscriptionOptions, ) -> Result<TranscriptionResult>
High-level STT from a prepared AudioInput via config provider (JOE-1787 / JOE-1938).
Sourcepub async fn transcribe_pcm(
&self,
samples: &[f32],
options: &TranscriptionOptions,
) -> Result<TranscriptionResult>
pub async fn transcribe_pcm( &self, samples: &[f32], options: &TranscriptionOptions, ) -> Result<TranscriptionResult>
High-level STT from mono PCM @ whisper sample rate (JOE-1787 / JOE-1938).
Builds a validated AudioInput then routes through the registry so
remote providers share the same path as file-based STT.
Sourcepub async fn preload_stt(&self, model: &str) -> Result<PathBuf>
pub async fn preload_stt(&self, model: &str) -> Result<PathBuf>
Preload a local STT model into this engine’s pool.
Sourcepub async fn synthesize(
&self,
text: &str,
options: &SynthesisOptions,
) -> Result<SynthesisResult>
pub async fn synthesize( &self, text: &str, options: &SynthesisOptions, ) -> Result<SynthesisResult>
High-level TTS synthesis via config tts_provider (JOE-1787 / JOE-1938).
Sourcepub fn clear_model_caches(&self)
pub fn clear_model_caches(&self)
Drop idle model residency in this engine’s pools (JOE-1784).
Sourcepub fn shutdown(&self)
pub fn shutdown(&self)
Mark the engine closed and clear idle model caches.
Does not touch process-global pools used by non-engine providers.
Sourcepub fn doctor(&self) -> DoctorReport
pub fn doctor(&self) -> DoctorReport
Read-only doctor report using this engine’s config.
Sourcepub fn support_bundle(&self, user_notes: Option<String>) -> SupportBundle
pub fn support_bundle(&self, user_notes: Option<String>) -> SupportBundle
Privacy-safe support bundle using this engine’s config and engine metrics.
pub fn metrics_snapshot(&self) -> MetricsSnapshot
Trait Implementations§
Source§impl Debug for AurumEngine
impl Debug for AurumEngine
Source§impl Drop for AurumEngine
impl Drop for AurumEngine
Auto Trait Implementations§
impl !Freeze for AurumEngine
impl !RefUnwindSafe for AurumEngine
impl !UnwindSafe for AurumEngine
impl Send for AurumEngine
impl Sync for AurumEngine
impl Unpin for AurumEngine
impl UnsafeUnpin for AurumEngine
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> 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