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.2.tar.gz (23.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

conch_sounds-0.4.2-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for conch_sounds-0.4.2.tar.gz
Algorithm Hash digest
SHA256 6627628b16491f19a602bd3f2a30312b2b52e710e1fe6a80829782e9119e497c
MD5 3dda06fe7a82be56fca4ac326a1531ea
BLAKE2b-256 f1886ca41b3336f24464b22aa070172436d60b2ddcabb5da63bf90db87b99204

See more details on using hashes here.

File details

Details for the file conch_sounds-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: conch_sounds-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 41.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for conch_sounds-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f336534498abcd7167b8d95d187f23bca883ddfed2b61a34b024c418042cabc8
MD5 3e2394e5d124e8b613a9a65842893cf3
BLAKE2b-256 3d42b54c57256bcba2a57427c6be2ac3f11dbea5048942b929d3bef221bb562a

See more details on using hashes here.

Supported by

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