Skip to main content

A Python library for applying information theory and AI/ML models to animal communication.

Project description

chatter: a Python library for applying information theory and AI/ML models to animal communication

The study of animal communication often involves categorizing units into types (e.g. syllables in songbirds, or notes in humpback whales). While this approach is useful in many cases, it necessarily flattens the complexity and nuance present in real communication systems. chatter is a new Python library for analyzing animal communication in continuous latent space using information theory and modern machine learning techniques. It is taxonomically agnostic, and has been tested with the vocalizations of birds, bats, whales, and primates. By leveraging a variety of different architectures, including variational autoencoders and vision transformers, chatter represents vocal sequences as trajectories in high-dimensional latent space, bypassing the need for manual or automatic categorization of units. The library provides an end-to-end workflow—from preprocessing and segmentation to model training and feature extraction—that enables researchers to quantify features like:

  • Complexity: path length of sequences in latent space per unit time.
  • Predictability: predictability of a transition in latent space.
  • Similarity: cosine similarity between units or sequences in latent space.
  • Novelty: inverse of predicted density of units or sequences in latent space.

Below is a basic diagram of the chatter workflow, showing the progression from spectrograms to latent features to visualizations in 2D space.

workflow

Additionally, chatter makes it easy to explore the latent space of a species' vocalizations, either statically or with an interactive plot like the one below (of syllables in Cassin's vireo song).

embeddings

This project is heavily inspired by the work of folks like Nilo Merino Recalde and Tim Sainburg. Here is a list of related projects:

Please cite chatter as:

@software{youngblood_chatter_2025,
   author = {Youngblood, Mason},
   title = {Chatter: a Python library for applying information theory and AI/ML models to animal communication},
   version = {v0.1.4},
   date = {2025},
   publisher = {GitHub},
   url = {https://github.com/masonyoungblood/chatter}
}

Installing chatter

chatter should always be installed inside a new virtual environment. To create an environment using conda you can run:

conda create -n chatter python==3.13.3

Then, you can activate the environment and install from GitHub using pip or uv:

conda activate chatter
pip install chatter-pkg
conda activate chatter
uv pip install chatter-pkg

Note that chatter uses torch as its machine learning backend, and was developed to use GPU acceleration on Apple Silicon. If you run into issues with compatibility, please look into the torch documentation before opening an issue on GitHub.

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

chatter_pkg-0.1.4.tar.gz (55.8 kB view details)

Uploaded Source

Built Distribution

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

chatter_pkg-0.1.4-py3-none-any.whl (55.2 kB view details)

Uploaded Python 3

File details

Details for the file chatter_pkg-0.1.4.tar.gz.

File metadata

  • Download URL: chatter_pkg-0.1.4.tar.gz
  • Upload date:
  • Size: 55.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chatter_pkg-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3a306352f2ec949a496c4bdd84bb9b19b27fbf847051f80ae34e7a0595a4d475
MD5 4671ae4982d9f2a12f36409322a40bb7
BLAKE2b-256 09b72d1273e68b1b6843b6f4ad3a1127ce61caaa0e0898308d9abf9750902308

See more details on using hashes here.

File details

Details for the file chatter_pkg-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: chatter_pkg-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 55.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chatter_pkg-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b67fc0a9b69487de6e1742c78b08bc682c514b636a41bf1af727846535153309
MD5 c867b6948300232c18daf9bbbdfa706b
BLAKE2b-256 e1dec1fcc9a66d22bd7a37677943ef27a6cdf2d5dcbc8ad8321251c723bfabdd

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