# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "mel_spec"
version = "0.4.0"
build = "build.rs"
exclude = [
    "examples",
    "pkg",
    "doc",
    "testdata/*",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Mel spectrograms aligned to the results from the whisper.cpp, pytorch and librosa reference implementations and suited to streaming audio."
readme = "README.md"
license = "MIT"
repository = "https://github.com/wavey-ai/mel-spec"

[features]
cuda = []
default = []
ort-tensor = ["ort"]
rtrb = ["dep:rtrb"]
wasm = [
    "web-sys",
    "wasm-bindgen",
    "js-sys",
]
wgpu = [
    "dep:bytemuck",
    "dep:pollster",
    "dep:wgpu",
]

[lib]
name = "mel_spec"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

[[test]]
name = "readme_examples"
path = "tests/readme_examples.rs"

[[test]]
name = "vad_regression"
path = "tests/vad_regression.rs"

[dependencies.bytemuck]
version = "1.22.0"
features = ["derive"]
optional = true

[dependencies.image]
version = "0.24.6"

[dependencies.js-sys]
version = "^0.3"
optional = true

[dependencies.ndarray]
version = "0.16.1"

[dependencies.ndarray-npy]
version = "0.9.1"

[dependencies.num]
version = "0.4.1"

[dependencies.ort]
version = "2.0.0-rc.9"
optional = true

[dependencies.pollster]
version = "0.4.0"
optional = true

[dependencies.rtrb]
version = "0.3.2"
optional = true

[dependencies.rustfft]
version = "6.2.0"

[dependencies.soundkit]
version = "0.11.0"
features = ["wasm"]
optional = true

[dependencies.wasm-bindgen]
version = "^0.2"
optional = true

[dependencies.web-sys]
version = "^0.3"
features = ["Worker"]
optional = true

[dependencies.wgpu]
version = "29.0.1"
optional = true

[dev-dependencies.soundkit]
version = "0.11.0"

[build-dependencies.cc]
version = "1.0"

[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
