pyannote-rs 0.3.4

Speaker diarization using pyannote in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::path::Path;

use eyre::Result;
use ort::session::builder::GraphOptimizationLevel;
use ort::session::Session;

pub fn create_session<P: AsRef<Path>>(path: P) -> Result<Session> {
    let session = Session::builder()?
        .with_optimization_level(GraphOptimizationLevel::Level3)?
        .with_intra_threads(1)?
        .with_inter_threads(1)?
        .commit_from_file(path.as_ref())?;
    Ok(session)
}