LLM plugin for embedding audio files (music, speech, sounds) and text using CLAP
Install this plugin in the same environment as LLM.
llm install llm-clapOnce 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.wavEmbeddings 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