pub struct WasmSynthesisResult {
pub audio_samples: Vec<i16>,
pub sample_rate: u32,
pub infer_seconds: f64,
pub audio_seconds: f64,
}Expand description
WASM-friendly synthesis result (no file I/O)
Fields§
§audio_samples: Vec<i16>Raw PCM audio samples (16-bit signed, mono)
sample_rate: u32Audio sample rate (e.g., 22050)
infer_seconds: f64Inference time in seconds
audio_seconds: f64Audio duration in seconds
Implementations§
Source§impl WasmSynthesisResult
impl WasmSynthesisResult
Sourcepub fn real_time_factor(&self) -> f64
pub fn real_time_factor(&self) -> f64
Real-time factor (infer_seconds / audio_seconds). Below 1.0 means faster than real-time.
Trait Implementations§
Source§impl Clone for WasmSynthesisResult
impl Clone for WasmSynthesisResult
Source§fn clone(&self) -> WasmSynthesisResult
fn clone(&self) -> WasmSynthesisResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WasmSynthesisResult
impl RefUnwindSafe for WasmSynthesisResult
impl Send for WasmSynthesisResult
impl Sync for WasmSynthesisResult
impl Unpin for WasmSynthesisResult
impl UnsafeUnpin for WasmSynthesisResult
impl UnwindSafe for WasmSynthesisResult
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
Mutably borrows from an owned value. Read more