Views
No views yet
online feature, speakrs downloads the required files from
this repository on first use. The SDK currently pins revision
5d24ffee75f13fb061fa6d10944a64e2dc1d5e6f..mlmodelc bundles for Apple-platform CoreML runs1# macOS with CoreML
2speakrs = { version = "0.5", features = ["coreml"] }
3
4# NVIDIA GPU
5speakrs = { version = "0.5", features = ["cuda"] }
6
7# CPU only
8speakrs = "0.5"1use speakrs::{ExecutionMode, OwnedDiarizationPipeline};
2
3fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
4 let mut pipeline = OwnedDiarizationPipeline::from_pretrained(ExecutionMode::CoreMl)?;
5
6 let audio: Vec<f32> = load_your_mono_16khz_audio_here();
7 let result = pipeline.run(&audio)?;
8
9 print!("{}", result.rttm("my-audio"));
10 Ok(())
11}SPEAKRS_MODELS_DIR to the local model directory.speakrs from the
pyannote community-1
pipeline and its segmentation and WeSpeaker components. PLDA and VBx parameters
are extracted from the pipeline cache. CoreML bundles are converted from the
exported model artifacts for Apple-platform execution.