[package]
name = "audio_samples"
version = "1.0.13"
edition = "2024"
authors = ["Jack Geraghty <jgeraghty049@gmail.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/jmg049/audio_samples"
repository = "https://github.com/jmg049/audio_samples"
documentation = "https://docs.rs/audio_samples"
description = "A typed audio processing library for Rust that treats audio as a first-class, invariant-preserving object rather than an unstructured numeric buffer."
keywords = ["audio", "dsp", "api"]
categories = ["encoding", "multimedia", "science"]
[package.metadata.docs.rs]
features = ["full"]
rustdoc-args = ["--cfg", "docsrs"]
[lib]
name = "audio_samples"
crate-type = ["rlib"]
[dependencies]
bytemuck = "1.25.0"
ndarray = "0.17"
num-traits = "0.2"
thiserror = "2.0"
miette = "7"
num-complex = "0.4"
i24 = { version = "2.3.4", features = [
"alloc",
"num-cast",
"ndarray",
"std",
] }
serde = { version = "1.0", features = ["derive"], optional = true }
rand = { version = "0.10.1", optional = true }
wide = { version = "1.5.0", optional = true }
spectrograms = { version = "1.4.2", optional = true }
serde_json = { version = "1.0.150", optional = true }
plotly = { version = "0.14.1", optional = true }
plotly_static = { version = "0.1.0", features = [
"chromedriver",
"webdriver_download",
], optional = true }
html_view = { version = "0.2.2", optional = true }
base64 = { version = "0.22", optional = true }
rubato = { version = "3.0.0", optional = true }
rayon = { version = "1.12.0", optional = true }
explainable = { version = "0.1.1", optional = true }
term-maths = { version = "1.0.0", optional = true }
open = { version = "5.3.5", optional = true }
rustfft = { version = "6.2", optional = true }
non-empty-slice = "0.6"
non-empty-iter = "0.3.1"
audioadapter = { version = "3.0.0", optional = true }
audioadapter-buffers = { version = "3.0.0", optional = true }
[features]
default = ["bare-bones"]
fancy = ["miette/fancy"]
statistics = []
processing = ["statistics"]
transforms = ["dep:spectrograms", "dep:rustfft"]
editing = [
"statistics",
"random-generation",
]
beat-tracking = ["onset-detection"]
onset-detection = [
"transforms",
"peak-picking",
"processing",
]
decomposition = [
"onset-detection",
]
dynamic-range = []
channels = []
iir-filtering = []
parametric-eq = ["iir-filtering", "channels"]
peak-picking = []
pitch-analysis = ["transforms"]
resampling = ["dep:rubato", "dep:rayon", "audioadapter", "audioadapter-buffers"]
vad = []
psychoacoustic = ["transforms"]
parallel = ["dep:rayon"]
opus-codec = ["psychoacoustic", "statistics"]
plotting = ["dep:plotly", "dep:base64", "dep:serde_json", "channels", "transforms", "editing"]
envelopes = [
"dynamic-range",
"editing",
"dep:rustfft"
]
fixed-size-audio = [
]
full = ["full_no_plotting", "plotting"]
full_no_plotting = [
"statistics",
"editing",
"transforms",
"channels",
"resampling",
"fixed-size-audio",
"beat-tracking",
"onset-detection",
"decomposition",
"dynamic-range",
"parametric-eq",
"peak-picking",
"pitch-analysis",
"processing",
"vad",
"iir-filtering",
"envelopes",
"random-generation",
"psychoacoustic",
"parallel",
"opus-codec",
]
educational = ["dep:explainable", "dep:term-maths", "dep:open", "processing", "fancy"]
bare-bones = []
static-plots = ["plotting", "dep:plotly_static", "dep:serde", "i24/serde"]
simd = ["dep:wide"]
random-generation = ["dep:rand"]
python = ["i24/pyo3"]
html_view = ["dep:html_view"]
[dev-dependencies]
approx_eq = "0.1.8"
clap = { version = "4.6.1", features = ["derive"] }
dtmf_tones = "1.0.1"
rand = "0.10.1"
criterion = { version = "0.8.2", features = ["html_reports"] }
proptest = "1.11.0"
[[example]]
name = "errors"
required-features = ["fancy"]
[[example]]
name = "error_diagnostics"
required-features = ["fancy"]
[[example]]
name = "psychoacoustic"
required-features = ["psychoacoustic"]
[[example]]
name = "educational"
required-features = ["educational", "processing"]
[[test]]
name = "codec_quality"
required-features = ["psychoacoustic", "random-generation"]
[[test]]
name = "opus_codec_quality"
required-features = ["opus-codec", "random-generation"]
[[test]]
name = "processing_pipeline"
required-features = ["statistics", "processing", "editing", "transforms"]
[[test]]
name = "channel_pipeline"
required-features = ["channels", "processing", "editing"]
[[test]]
name = "effects_chain"
required-features = ["channels", "iir-filtering", "dynamic-range", "parametric-eq"]
[[test]]
name = "analysis_pipeline"
required-features = ["pitch-analysis", "vad"]