Skip to main content

Generate embeddings for audio files using CLAP with llm

Project description

LLM plugin for embedding audio files (music, speech, sounds) and text using CLAP

Installation

Install this plugin in the same environment as LLM.

llm install llm-clap

Usage

Once you have installed an embedding model you can use it to embed text like this:

llm embed -m clap -c 'Hello world'

Or an audio file like this:

llm embed -m clap --binary -i AUDIO_1431.wav

Embeddings are more useful if you store them in a database - see the LLM documentation for details.

To embed every audio file in a folder and save them in a collection called "songs":

llm embed-multi songs -m clap --binary --files songs/ '*.wav'

You can then search for songs of specific things like this:

llm similar songs -c 'rap'

But you can also find songs/audio similar to a given audio file like this:

llm similar songs --binary -i MYSONG.wav

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

llm_clap-0.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

llm_clap-0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file llm_clap-0.2.tar.gz.

File metadata

  • Download URL: llm_clap-0.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for llm_clap-0.2.tar.gz
Algorithm Hash digest
SHA256 32052c7620d83f4939f17959990266df5b43480b38ec3b3c4af3269fc7cbfee3
MD5 47f2c8b202ec060f2aa6bb0659f2cfc5
BLAKE2b-256 8c0ae9115156f90c1f1a5463a9b4faeebde6a34abf81f28d824b0998bf685de8

See more details on using hashes here.

File details

Details for the file llm_clap-0.2-py3-none-any.whl.

File metadata

  • Download URL: llm_clap-0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for llm_clap-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4c1acc66d9f6bf95c7bb97227be574d17ab63b27df7ca3a1ddc9d5747240852
MD5 92a03adbafb9f8b570967ec3bea1a22b
BLAKE2b-256 7e0629b5d7972d899a61cc5496e83cf9cb466524a4e6323752dba92de44a4944

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