pub struct PyannoteVoices<S, E> { /* private fields */ }Implementations§
Source§impl<S: Segmenter, E: Embedder> PyannoteVoices<S, E>
impl<S: Segmenter, E: Embedder> PyannoteVoices<S, E>
pub fn new( segmenter: S, embedder: E, enrolled: Vec<Profile>, grouping: Grouping, ) -> Self
Sourcepub fn shape(&self) -> &ChunkShape
pub fn shape(&self) -> &ChunkShape
The chunk width the net answers on.
Sourcepub fn hop(&self) -> u64
pub fn hop(&self) -> u64
How far the track advances between chunks. Together with the shape it fixes where every chunk sits, so a caller keeping chunks across runs can tell whether the ones it kept still describe this track.
Sourcepub fn hear(&mut self, recording: &RecordingReader) -> Option<Chunk>
pub fn hear(&mut self, recording: &RecordingReader) -> Option<Chunk>
The next chunk the net can read, None once the recording holds no
more. A chunk that cannot be read is skipped rather than ending the
walk: its audio is spent either way.
Sourcepub fn group(&mut self, chunk: &Chunk) -> Revision
pub fn group(&mut self, chunk: &Chunk) -> Revision
Places every voiceprint one chunk held, then folds any voices they proved to be one.
Sourcepub fn heard_so_far(&self) -> Vec<Standing>
pub fn heard_so_far(&self) -> Vec<Standing>
Every voice the track is holding, in the order they were first heard.
A caller sweeping Grouping reads this after each chunk to watch a
session settle: how many people the track believes in, and how long
it took to stop changing its mind.
Source§impl<S: Segmenter, E: Embedder> PyannoteVoices<S, E>
impl<S: Segmenter, E: Embedder> PyannoteVoices<S, E>
Sourcepub fn retained_from(&self) -> u64
pub fn retained_from(&self) -> u64
The earliest stream position this track still needs. Its reader may release everything before it, and nothing before it can be re-read.
Sourcepub fn skip_to(&mut self, position: u64)
pub fn skip_to(&mut self, position: u64)
Gives up on the audio before position and starts the next chunk
there.
The stretch skipped ends up with no speaker, which is what a track too far behind to read it would produce anyway. Not aligned to the hop: the timeline is indexed off absolute positions, so a new origin costs nothing but the chunks that were never read.