pub struct CodecEncoder { /* private fields */ }Implementations§
Source§impl CodecEncoder
impl CodecEncoder
pub fn from_tensors( prefix: &str, tensors: &HashMap<String, (Vec<f32>, Vec<usize>)>, cfg: &CodecArgs, ) -> Result<CodecEncoder, Error>
Sourcepub fn encode_pcm_to_voice_embedding(
&self,
pcm: &[f32],
embed: &EmbeddingTables,
name: &str,
) -> Result<VoiceEmbedding, Error>
pub fn encode_pcm_to_voice_embedding( &self, pcm: &[f32], embed: &EmbeddingTables, name: &str, ) -> Result<VoiceEmbedding, Error>
Encode mono PCM at model sample rate into LLM voice rows [n_frames, hidden].
Auto Trait Implementations§
impl Freeze for CodecEncoder
impl RefUnwindSafe for CodecEncoder
impl Send for CodecEncoder
impl Sync for CodecEncoder
impl Unpin for CodecEncoder
impl UnsafeUnpin for CodecEncoder
impl UnwindSafe for CodecEncoder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more