Replace all instances of the legacy product names "Kon" and "Corbie" with "Magnotia" across user-facing copy, code identifiers, package names, bundle ids, file paths, and documentation. Preserves the unrelated "konsole" (KDE terminal) reference and the parent CORBEL company name. - Renames 10 Rust crates (kon-* → magnotia-*) and the tauri binary - Updates package.json, tauri.conf.json (productName + identifier) - Renames CSS classes (kon-rh-* → magnotia-rh-*) and animations - Renames brand and roadmap docs - Regenerates Cargo.lock and package-lock.json Verified: svelte-check passes; pure-rust crates compile under new names.
20 lines
654 B
Rust
20 lines
654 B
Rust
use std::path::Path;
|
|
|
|
use magnotia_core::error::Result;
|
|
use magnotia_core::types::AudioSamples;
|
|
|
|
use crate::decode::decode_audio_file;
|
|
use crate::resample::resample_to_16khz;
|
|
|
|
/// Decode and resample an audio file on a blocking thread.
|
|
/// Returns 16kHz mono AudioSamples ready for transcription.
|
|
pub async fn decode_and_resample(path: &Path) -> Result<AudioSamples> {
|
|
let path = path.to_path_buf();
|
|
tokio::task::spawn_blocking(move || {
|
|
let audio = decode_audio_file(&path)?;
|
|
resample_to_16khz(&audio)
|
|
})
|
|
.await
|
|
.map_err(|e| magnotia_core::error::MagnotiaError::AudioDecodeFailed(format!("Task join error: {e}")))?
|
|
}
|