[package]
name = "audio_samples_qoe"
version = "0.1.0"
edition = "2024"
rust-version = "1.87"
authors = ["Jack Geraghty <jgeraghty049@gmail.com>"]
license = "MIT"
description = "Perceptual audio quality metrics (ViSQOL MOS-LQO and SCOREQ) - pure-Rust implementations over the audio_samples ecosystem."
homepage = "https://github.com/jmg049/audio_samples_qoe"
repository = "https://github.com/jmg049/audio_samples_qoe"
readme = "README.md"
keywords = ["audio", "quality", "visqol", "mos", "dsp"]
categories = ["multimedia::audio", "science"]

exclude = [
    "python/notebooks/",
    "python/docs/",
    "python/examples/",
    "python/tests/",
    "benches/compare_cpp.sh",
    ".github/",
    ".python-version",
]

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

[dependencies]
audio_samples = { version = "1.0.13", default-features = false, features = ["transforms", "vad", "statistics", "processing", "resampling", "editing", "envelopes", "channels"] }
audio_samples_io = { version = "0.3.2", features = ["wav", "flac"] }
miette = { version = "7.6.0", features = ["fancy"] }
ndarray = "0.17.2"
spectrograms = "2.1.0"
thiserror = "2.0.18"

# SCOREQ (neural metric) — gated behind the `scoreq` feature; pulls an ONNX
# runtime and an HTTP client for on-demand model-weight download.
ort = { version = "=2.0.0-rc.12", optional = true }
ureq = { version = "3.3.0", optional = true }

# Python bindings — gated behind the `python` feature, enabled by maturin.
pyo3 = { version = "0.29", optional = true, features = ["extension-module", "abi3-py310"] }
numpy = { version = "0.29", optional = true }

[features]
default = []
scoreq = ["dep:ort", "dep:ureq"]
python = ["dep:pyo3", "dep:numpy"]

[dev-dependencies]
criterion = { version = "0.8.2", features = ["html_reports"] }

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

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

[[example]]
name = "eval_datasets"

[profile.release]
lto = true
