pub struct PowersetSegmenter { /* private fields */ }Expand description
ONNX-backed powerset speaker segmenter.
Implementations§
Source§impl PowersetSegmenter
impl PowersetSegmenter
Sourcepub fn new(model_path: impl AsRef<Path>) -> Result<Self, SegmentationError>
pub fn new(model_path: impl AsRef<Path>) -> Result<Self, SegmentationError>
{ true }
pub fn new(model_path: impl AsRef<Path>) -> Result<Self, SegmentationError>
{ true }
Load the ONNX model from model_path with the target’s default
execution provider (today’s behavior: CoreML on Apple Silicon).
Sourcepub fn with_config(
model_path: impl AsRef<Path>,
config: PowersetConfig,
ep: ExecutionProvider,
) -> Result<Self, SegmentationError>
pub fn with_config( model_path: impl AsRef<Path>, config: PowersetConfig, ep: ExecutionProvider, ) -> Result<Self, SegmentationError>
{ true }
pub fn with_config( model_path: impl AsRef<Path>, config: PowersetConfig, ep: ExecutionProvider, ) -> Result<Self, SegmentationError>
{ true }
Load with explicit configuration and execution provider.
When the active inference backend is tract (POLYVOICE_INFERENCE_BACKEND=tract
or crate::onnx::InferenceBackend::force), this remaps a shipping
powerset path to powerset_fp32_tract.onnx if present beside it, and
forces micro-batch N to 1 (tract LSTM Scan cannot run N>1). Session
pool stays configurable — that is the tract parallelism knob.
Sourcepub fn config(&self) -> &PowersetConfig
pub fn config(&self) -> &PowersetConfig
{ true } pub fn config(&self) -> &PowersetConfig { ret == &self.config }
Sourcepub fn model_path(&self) -> &Path
pub fn model_path(&self) -> &Path
{ true } pub fn model_path(&self) -> &Path { ret == self.model_path.as_path() }
Trait Implementations§
Source§impl Segmenter for PowersetSegmenter
impl Segmenter for PowersetSegmenter
Source§fn segment(&self, audio: &[f32]) -> Result<Vec<RawSegment>, SegmentationError>
fn segment(&self, audio: &[f32]) -> Result<Vec<RawSegment>, SegmentationError>
Source§fn max_local_speakers(&self) -> usize
fn max_local_speakers(&self) -> usize
powerset-3.0 ⇒ 3.Source§fn supports_overlap(&self) -> bool
fn supports_overlap(&self) -> bool
powerset-3.0 ⇒ true.Auto Trait Implementations§
impl !Freeze for PowersetSegmenter
impl RefUnwindSafe for PowersetSegmenter
impl Send for PowersetSegmenter
impl Sync for PowersetSegmenter
impl Unpin for PowersetSegmenter
impl UnsafeUnpin for PowersetSegmenter
impl UnwindSafe for PowersetSegmenter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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