Skip to main content

Contrastive learning-based Deep Perceptual Audio Metric (CDPAM) [Webpage]

Contrastive Learning For Perceptual Audio Similarity

Pranay Manocha, Zeyu Jin, Richard Zhang, Adam Finkelstein

This is a Pytorch implementation of our new and improved audio perceptual metric. It contains (0) minimal code to run our perceptual metric (CDPAM).

(0) Usage as a loss function

Minimal basic usage as a distance metric

Running the command below takes two audio files as input and gives the perceptual distance between the files. It should return (approx)distance = 0.1696. Some GPU's are non-deterministic, and so the distance could vary in the lsb.

Installing the metric (CDPAM - perceptual audio similarity metric)

pip install cdpam

Using the metric is as simple as:

import cdpam
loss_fn = cdpam.DPAM()
wav_ref = cdpam.load_audio('sample_audio/ref.wav')
wav_out = cdpam.load_audio('sample_audio/2.wav')

dist = loss_fn.forward(wav_ref,wav_out)

Metadata

Release files for cdpam 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdpam 0.0.6
File Size Uploaded Provenance Actions
cdpam-0.0.6.tar.gz 98.3 MB Without provenance Details for cdpam-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cdpam 0.0.6
File Interpreter ABI Platform Actions
cdpam-0.0.6-py3-none-any.whl Python 3 none any Details for cdpam-0.0.6-py3-none-any.whl

Total release size: 196.7 MB

Release files / cdpam-0.0.6.tar.gz

Download URL cdpam-0.0.6.tar.gz
Size 98.3 MB
Tags Source
SHA-256 checksum
How to use checksums
d1e8d9ba0cf49ecb226b8263e13cbabba9574997f9eefe0dce9683e57a7fe734
BLAKE2b-256 checksum
How to use checksums
5976d4be81f695c7269e05a46c046f9af0c8eba920add735f1c50f9843545a29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.5.0.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3

Release files / cdpam-0.0.6-py3-none-any.whl

Download URL cdpam-0.0.6-py3-none-any.whl
Size 98.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
abd860166a55ada94cb653997deed481b518e3a593e9b417a969f99522009eba
BLAKE2b-256 checksum
How to use checksums
7194a1bb744131083b36f778864bb05338e6e4153e6cde5acf9a6767e50160f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.5.0.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3

Security for cdpam 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page