Skip to main content

Analyze acoustic similarity in Python

Project description

Conch

Build Status Coverage Status Documentation Status PyPI version DOI

This package contains functions for converting wav files into auditory representations and calculating distance between them.

Auditory representations currently supported are mel-frequency cepstrum coefficients (MFCCs) and amplitude envelopes.

Distance metrics currently implemented are dynamic time warping and cross-correlation.

Installation

The latest released version can be installed via:

pip install conch_sounds

Higher level wrappers

In conch/main.py there are several wrapper functions for convenience.

Each of these functions takes keyword arguments corresponding to how auditory representations should be constructed and what distance function to use.

acoustic_similarity_mapping takes a mapping of paths as its argument. This argument should be a list of pairs or triplets of fully specified file names. Pairs will compute the distance between the two files, and triplets will compute an AXB style design, where distances are computed between the first element and the second and between the third element and the second. In this case, the numerical output will be a ratio of the third element's distance to the second divided by the first element's distance to the second. The return value is a dictionary with the pairs/triplets as keys, and the numerical output as the values.

acoustic_similarity_directories takes two arguments which are fully specified paths to two directories. It then constructs a path mapping of all the files in the first directory to all the files in the second directory. The return value is a single value, which the average distance of all those calculated.

analyze_directory takes a single directory as an argument and creates a path mapping of all the files compared to all other files. The return value is a dictionary with the file pairs as keys, and the numerical output as the values.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conch_sounds-0.4.0.tar.gz (23.4 MB view details)

Uploaded Source

Built Distribution

Conch_sounds-0.4.0-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file conch_sounds-0.4.0.tar.gz.

File metadata

  • Download URL: conch_sounds-0.4.0.tar.gz
  • Upload date:
  • Size: 23.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for conch_sounds-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f73d23e9bc0716f09d02f6f421684f00efaf943ac1f8a506df7c1b63e064ef67
MD5 ff645dd4e042ce49cfa9cef8cb2f4a74
BLAKE2b-256 3a37e022d8c67ce8c1be8bdcfb885926226a820557e163f44803d3fcd3313913

See more details on using hashes here.

File details

Details for the file Conch_sounds-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: Conch_sounds-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for Conch_sounds-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2daaad29a0553976c3b284a48170c2fc574bdbb42e980d5c1b7e73f869050e32
MD5 fee8fd5c5d96fea2bdee92197dd47c4e
BLAKE2b-256 3da09eb528abb4163d81d421aa9072e5142d7f4b450b35641c5020da217ccabd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page