Prepare repo (or use cargo add)
git clone https://github.com/thewh1teagle/pyannote-rs --recursive
Prepare models
wget https://github.com/thewh1teagle/pyannote-rs/releases/download/v0.1.0/segmentation-3.0.onnx
wget https://github.com/thewh1teagle/pyannote-rs/releases/download/v0.1.0/wespeaker_en_voxceleb_CAM++.onnx
wget https://github.com/thewh1teagle/pyannote-rs/releases/download/v0.1.0/6_speakers.wav
Build Example
cargo run --example diarize 6_speakers.wav
Gotachas
Static linking failed on Windows
You can resolve it by creating .cargo/config.toml
next to Cargo.toml
with the following:
[target.'cfg(windows)']
rustflags = ["-C target-feature=+crt-static"]
Or set the environment variable RUSTFLAGS
to -C target-feature=+crt-static
If it doesn't help make sure all of your dependencies also links MSVC runtime statically. You can inspect the build with the following:
- Set
RUSTC_LOG
torustc_codegen_ssa::back::link=info
- Build with
cargo build -vv
Since there's a lot of output, it's good idea to pipe it to file and check later:
cargo build -vv >log.txt 2>&1
Look for the flags /MD
(Meaning it links it dynamically) and /MT
or -MT
(Meaning it links it statically). See MSVC_RUNTIME_LIBRARY and pyannote-rs/issues/1
gh release create v0.3.0-beta.0 --title "v0.3.0-beta.0" --generate-notes
git pull # Fetch new tags