Expand description
§aurum-core
Reusable on-device speech I/O library (experimental API).
- STT — local whisper.cpp by default; optional OpenRouter
- TTS — local ONNX KittenTTS (cargo feature
tts, default on) - Cleanup — rules or optional LLM post-edit
Tagline: Speech both ways. On-device by default.
The API may change without notice until a deliberate major version.
§STT example (provider path)
use aurum_core::audio::{AudioInput, WHISPER_SAMPLE_RATE};
use aurum_core::pcm::PcmBuffer;
use aurum_core::providers::{LocalWhisperProvider, TranscriptionOptions};
use std::path::PathBuf;
let provider = LocalWhisperProvider::new(PathBuf::from("/tmp/aurum-cache"))
.with_progress(false)
.with_local_only(false);
provider.preload("tiny-q5_1").await?;
let mut buf = PcmBuffer::dictation();
buf.push(&[0.0f32; 1600])?;
let result = provider
.transcribe_pcm(
buf.samples().as_slice(),
&TranscriptionOptions {
model: "tiny-q5_1".into(),
language: "en".into(),
timestamps: false,
cancel: None,
},
)
.await?;
let _ = AudioInput::from_pcm_slice(buf.samples().as_slice(), WHISPER_SAMPLE_RATE)?;
println!("{}", result.text);
aurum_core::providers::local::clear_context_cache();§Engine path (preferred for library hosts)
use aurum_core::AurumEngine;
let engine = AurumEngine::load()?;
let _ = engine.doctor();
let _ = engine.support_bundle(None);
engine.shutdown();Re-exports§
pub use audio::load_audio;pub use audio::AudioInput;pub use audio::WHISPER_SAMPLE_RATE;pub use batch::build_items;pub use batch::discover_inputs;pub use batch::fingerprint_file;pub use batch::manifest_path;pub use batch::merge_for_resume;pub use batch::work_indices;pub use batch::BatchItem;pub use batch::BatchItemStatus;pub use batch::BatchManifest;pub use batch::BatchSummary;pub use batch::AUDIO_EXTENSIONS;pub use batch::BATCH_MANIFEST_NAME;pub use batch::BATCH_MANIFEST_VERSION;pub use cancel::CancelFlag;pub use capabilities::preflight_cleanup;pub use capabilities::preflight_stt;pub use capabilities::preflight_tts;pub use capabilities::ProviderCapabilities;pub use capabilities::CAPABILITY_SCHEMA_VERSION;pub use cleanup::apply_cleanup;pub use cleanup::apply_cleanup_with_segments;pub use cleanup::cleanup_text;pub use cleanup::CleanupProviderKind;pub use cleanup::CleanupReport;pub use cleanup::CleanupResult;pub use cleanup::CleanupStyle;pub use cleanup::OpenRouterCleanup;pub use cleanup::RulesCleanup;pub use cleanup::SegmentCleanupPolicy;pub use cleanup::TextCleanup;pub use config::Config;pub use config::EffectiveConfigDiagnostic;pub use config::RawConfig;pub use config::ValidatedConfig;pub use doctor::run_doctor;pub use doctor::DoctorCheck;pub use doctor::DoctorReport;pub use doctor::DoctorSeverity;pub use doctor::DOCTOR_SCHEMA_VERSION;pub use dto::ErrorDto;pub use dto::SttResultDto;pub use dto::ERROR_SCHEMA_VERSION;pub use dto::STT_RESULT_SCHEMA_VERSION;pub use engine::AurumEngine;pub use error::AurumError;pub use error::ErrorCategory;pub use error::Result;pub use error::TranscriptionError;pub use eval::build_report;pub use eval::char_error_rate;pub use eval::repetition_ratio;pub use eval::score_stt;pub use eval::silence_false_positive;pub use eval::smoke_corpus;pub use eval::word_error_rate;pub use eval::EvalCorpus;pub use eval::EvalReport;pub use eval::SttFixture;pub use eval::SttScore;pub use model::list_models;pub use model::DownloadProgress;pub use model::EnsureModelOptions;pub use model::ModelInfo;pub use model::ModelStatus;pub use observability::process_metrics;pub use observability::DiagnosticBundle;pub use observability::Metrics;pub use observability::MetricsSnapshot;pub use observability::SpanTimer;pub use observability::METRICS_SCHEMA_VERSION;pub use output::commit_text;pub use output::format_result;pub use output::write_result;pub use output::write_result_to_path;pub use output::CommitMode;pub use output::OutputFormat;pub use output::OutputTransaction;pub use output::SymlinkPolicy;pub use output::DEFAULT_MAX_OUTPUT_BYTES;pub use partial::PartialSession;pub use partial::PartialSessionConfig;pub use partial::PartialUpdate;pub use pcm::PcmBuffer;pub use postprocess::normalize_result_with_report;pub use postprocess::NormalizationReport;pub use profile::format_recommendation;pub use profile::resolve_profile;pub use profile::ProfileResolution;pub use profile::QualityProfile;pub use profile::PROFILE_EVIDENCE_VERSION;pub use providers::LocalWhisperProvider;pub use providers::OpenRouterProvider;pub use providers::OpenRouterSttMode;pub use providers::Segment;pub use providers::TranscriptionOptions;pub use providers::TranscriptionProvider;pub use providers::TranscriptionResult;pub use remote::HardenedHttpClient;pub use remote::RemotePolicy;pub use runtime::GovernorConfig;pub use runtime::Lifecycle;pub use runtime::LifecycleState;pub use runtime::OpContext;pub use runtime::PermitKind;pub use runtime::ResourceGovernor;pub use secret::SecretString;pub use support::build_support_bundle;pub use support::default_bundle_path;pub use support::SupportBundle;pub use support::SUPPORT_BUNDLE_VERSION;pub use window::PartialClock;pub use window::PartialWindowPolicy;pub use tts::format_adapters as format_tts_adapters;pub use tts::format_custom_list as format_tts_custom_list;pub use tts::format_inspect as format_tts_inspect;pub use tts::format_model_list as format_tts_model_list;pub use tts::format_voice_list as format_tts_voice_list;pub use tts::inspect_pack as inspect_tts_pack;pub use tts::list_adapters as list_tts_adapters;pub use tts::list_models as list_tts_models;pub use tts::list_voices as list_tts_voices;pub use tts::propose_add_local as propose_tts_add_local;pub use tts::resolve_voice_for_model;pub use tts::run_kitten_catalogue_conformance;pub use tts::run_pack_conformance;pub use tts::verify_pack as verify_tts_pack;pub use tts::write_add_manifest as write_tts_add_manifest;pub use tts::write_wav_i16_mono_atomic;pub use tts::write_wav_i16_mono_transaction;pub use tts::BackendKind as TtsBackendKind;pub use tts::LocalTtsProvider;pub use tts::SynthesisOptions;pub use tts::SynthesisProvider;pub use tts::SynthesisResult;pub use tts::TrustMode;pub use tts::DEFAULT_TTS_MODEL;pub use tts::DEFAULT_TTS_VOICE;pub use tts::KOKORO_DEFAULT_VOICE;pub use tts::KOKORO_TTS_MODEL;
Modules§
- audio
- Audio loading and conversion.
- batch
- Bounded, resumable multi-file transcription manifests (JOE-1726).
- bench
- Lightweight reproducible benchmark helpers (JOE-1606).
- cache
- Cache inventory, verification, quarantine, and repair (JOE-1592).
- cancel
- Cooperative cancellation for long-running local transcription.
- capabilities
- Provider/model capability contracts and preflight routing (JOE-1613).
- cleanup
- Post-transcription text cleanup ( “flow”).
- config
- Configuration loading for Aurum.
- doctor
- Read-only system / config / cache / capability diagnostics (JOE-1628).
- download
- Shared verify-before-publish artifact downloader (JOE-1591).
- dto
- Versioned external JSON DTOs (JOE-1614).
- engine
- Owned engine boundary for library hosts (JOE-1782 / JOE-1654).
- error
- Error taxonomy for Aurum (JOE-1611).
- eval
- Versioned quality evaluation helpers (JOE-1607).
- model
- Local whisper.cpp model management: resolve, download, cache, list.
- observability
- Structured operation metrics and privacy-safe diagnostics (JOE-1627).
- output
- Output formatters: txt, srt, json — and secure file commit transactions.
- partial
- Host-driven partial transcription session (JOE-1605).
- pcm
- In-memory PCM buffer for mic / streaming hosts (no files, no ffmpeg).
- postprocess
- Shared transcript cleanup applied after every provider (JOE-1609).
- profile
- Intent-oriented quality profiles (JOE-1723).
- providers
- Transcription provider abstraction.
- remote
- Shared remote HTTP client and response validation (JOE-1587, JOE-1588).
- runtime
- Runtime lifecycle, concurrency, and resource governance (JOE-1573).
- secret
- Redacting secret wrapper (JOE-1779 / JOE-1654).
- support
- Privacy-safe support bundles for early adopters (JOE-1728).
- tts
- Local text-to-speech (TTS) — ONNX KittenTTS + MIT G2P.
- window
- Rolling-window helpers for host-driven “partial-like” decode loops.