Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.66 KB

BUILDING.md

File metadata and controls

61 lines (40 loc) · 1.66 KB

Building

Prerequisites

Cargo | Clang | Cmake

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:

  1. Set RUSTC_LOG to rustc_codegen_ssa::back::link=info
  2. 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