pub trait AudioTokenizer {
type Tensor: Tensor;
// Required methods
fn config(&self) -> AudioTokenizerConfig;
fn encode(
&mut self,
pcm: &Self::Tensor,
context: &<Self::Tensor as Tensor>::Context,
) -> Result<Self::Tensor, Error>;
fn decode(
&mut self,
codes: &Self::Tensor,
context: &<Self::Tensor as Tensor>::Context,
) -> Result<Self::Tensor, Error>;
}Expand description
Common interface for neural audio tokenizers.
Required Associated Types§
Required Methods§
Sourcefn config(&self) -> AudioTokenizerConfig
fn config(&self) -> AudioTokenizerConfig
Codec configuration.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".