pub trait Vocoder {
// Required methods
fn vocalize(&self, mel: &[Vec<f32>]) -> Result<Vec<f32>, SpeechError>;
fn sample_rate(&self) -> u32;
fn n_mels(&self) -> usize;
}Expand description
Trait for neural vocoder (mel to audio).
Required Methods§
Sourcefn sample_rate(&self) -> u32
fn sample_rate(&self) -> u32
Get output sample rate
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".