Metadata-Version: 2.4
Name: cels-audio
Version: 0.1.1
Summary: Cumulative Energy Losses for differentiable audio optimisation
Author: Pablo Tablas de Paula
License-Expression: MIT
Project-URL: Repository, https://github.com/ptablasdpaula/ICASSP27-Phrase/tree/cel-library
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.1
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: ruff>=0.12; extra == "test"
Dynamic: license-file

# cels-audio

Differentiable Cumulative Energy Losses (CeLs) for PyTorch. Compare energy
accumulated along any selection of four diagonal and four orthogonal directions,
with optional logarithmic frequency weighting and finite-horizon decay.

```bash
pip install cels-audio
```

```python
from cels import STFTCumulativeEnergyLoss

loss = STFTCumulativeEnergyLoss(sample_rate=16000)
# candidate and target are waveform tensors; gradients flow through candidate.
value = loss(candidate, target)
value.backward()
```

For examples, the cumulative-energy figure, mathematical definitions and the
paper citation, see the [library documentation](https://github.com/ptablasdpaula/ICASSP27-Phrase/tree/cel-library).

Requires Python 3.10 or later and PyTorch 2.1 or later. MIT licensed.
