polyvoice 0.5.2

Speaker diarization library for Rust — online and offline, ONNX-powered, ecosystem-agnostic
Documentation
[package]
name = "polyvoice"
version = "0.5.2"
edition = "2024"
description = "Speaker diarization library for Rust — online and offline, ONNX-powered, ecosystem-agnostic"
license = "MIT"
repository = "https://github.com/ekhodzitsky/polyvoice"
keywords = ["diarization", "speaker", "onnx", "stt", "voice"]
categories = ["multimedia::audio", "science"]

[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = []
# Enable ONNX-based embedding extractors (pulls ort).
onnx = ["dep:ort"]
# Enable C FFI bindings.
ffi = []
# Enable CLI binary (polyvoice command).
cli = ["onnx", "dep:clap", "dep:ureq", "dep:dirs"]

[dependencies]
# ONNX Runtime — matches the ecosystem version.
ort = { version = "2.0.0-rc.12", optional = true }

# WAV file I/O
hound = "3.5"

# Lock-free queue for ONNX session pooling
crossbeam-queue = "0.3"

# Error handling
anyhow = "1"
thiserror = "1"

# Logging
tracing = "0.1"

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"

# Math / numerics
ndarray = { version = "0.17", default-features = false }
realfft = "3.5"
num-complex = "0.4"

# CLI (optional)
clap = { version = "4", features = ["derive", "env"], optional = true }
ureq = { version = "3", optional = true }
dirs = { version = "6", optional = true }

[dev-dependencies]
hound = "3.5"
tempfile = "3"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
proptest = "1"
criterion = "0.5"
loom = "0.7.2"

[[bench]]
name = "diarization"
harness = false

[[bench]]
name = "der"
harness = false

[[bench]]
name = "der_ami"
harness = false

[[bin]]
name = "polyvoice"
path = "src/bin/polyvoice.rs"
required-features = ["cli"]

[[bin]]
name = "polyvoice-bench"
path = "src/bin/polyvoice-bench.rs"
required-features = ["cli"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] }

[profile.release]
lto = true
codegen-units = 1
strip = true