pub struct Lfm3AudioEncoder {
pub cfg: Lfm3AudioConfig,
pub text_hidden: usize,
/* private fields */
}Expand description
The speech encoder and its projector.
Fields§
§cfg: Lfm3AudioConfigImplementations§
Source§impl Lfm3AudioEncoder
impl Lfm3AudioEncoder
pub fn from_model( model: &Arc<CmfModel>, pool: Option<Arc<Pool>>, ) -> Result<Self, String>
Sourcepub fn encode(&self, mel: &[f32], frames: usize) -> Result<Vec<f32>, String>
pub fn encode(&self, mel: &[f32], frames: usize) -> Result<Vec<f32>, String>
Encoder rows [⌈frames/8⌉, hidden] of log-mel features
[n_mels][frames], before the projector.
Auto Trait Implementations§
impl !RefUnwindSafe for Lfm3AudioEncoder
impl !UnwindSafe for Lfm3AudioEncoder
impl Freeze for Lfm3AudioEncoder
impl Send for Lfm3AudioEncoder
impl Sync for Lfm3AudioEncoder
impl Unpin for Lfm3AudioEncoder
impl UnsafeUnpin for Lfm3AudioEncoder
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