laion-clap
Contrastive Language-Audio Pretraining Model from LAION
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you need audio-text embeddings and are comfortable with the 18 dependencies and aging maintenance status. The package is permissively licensed, has no known vulnerabilities, and offers multiple pretrained models for different audio domains. However, verify that the HuggingFace checkpoints you need are still available, and be aware that the last release was 467 days ago—if you encounter bugs or need updates, community support may be limited.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Audio must be resampled to 48000 Hz.
- Requires PyTorch and librosa; model checkpoint is downloaded on first load_ckpt() call.
- Low install friction with a pure Python wheel.
License · maintenance · safety
permissive license (permissive) — Released under CC0 1.0 Universal, which places the work in the public domain with no copyright restrictions. You may use, modify, and distribute it freely for any purpose, including commercial, with no attribution requirement.
last release 2025-05-04 (467 days) · last repo commit 2025-05-15 · 2,250 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 94,890 downloads/mo, #13,300 on PyPI
Alternatives
Verify before relying
pip install laion-clap
import laion_clap
import librosa
model = laion_clap.CLAP_Module(enable_fusion=False)
model.load_ckpt()
audio_data, _ = librosa.load('audio.wav', sr=48000)
audio_data = audio_data.reshape(1, -1)
audio_embed = model.get_audio_embedding_from_data(x=audio_data, use_tensor=False)
text_embed = model.get_text_embedding(["dog barking"])- Whether pretrained checkpoints (630k-audioset-best.pt, music_audioset_epoch_15_esc_90.14.pt, etc.) remain reliably available from HuggingFace.
- Whether the aging maintenance status (467 days since last release) signals planned deprecation or stable maturity.
- Performance and memory footprint of the larger audio encoder models (HTSAT-base) on typical hardware.
What it is and what it does
CLAP is a PyPI package that wraps Contrastive Language-Audio Pretraining models, allowing you to generate fixed-size embeddings for both audio files and text descriptions. The embeddings are trained to align semantically—audio and text describing the same content will have similar embeddings in the learned space. You load a pretrained checkpoint (trained on AudioSet, music, speech, or combinations thereof), then call methods to embed audio from files or raw data, or to embed text strings. The package handles the model architecture, quantization, and checkpoint management internally.
The typical workflow is to extract embeddings for a corpus of audio and text, then use those embeddings for tasks like zero-shot audio classification (by comparing audio embeddings to class-label text embeddings), cross-modal retrieval, or as features for downstream supervised models. The package depends on librosa for audio loading, transformers for text encoding, and PyTorch for the model itself, plus 15 other utilities for data handling and training infrastructure.
Use it for
- Zero-shot audio classification by embedding audio and comparing to embeddings of class labels as text.
- Cross-modal retrieval: find audio clips matching a text query or vice versa by embedding both and ranking by similarity.
- Audio-text dataset annotation: embed a large audio corpus and use text queries to discover or label relevant clips.
- Feature extraction for downstream models: use CLAP embeddings as fixed input features for audio classification or tagging tasks.
- Music or speech recognition: use pretrained checkpoints tuned for music or speech to embed domain-specific audio.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you need audio-text embeddings and are comfortable with the 18 dependencies and aging maintenance status. The package is permissively licensed, has no known vulnerabilities, and offers multiple pretrained models for different audio domains. However, verify that the HuggingFace checkpoints you need are still available, and be aware that the last release was 467 days ago—if you encounter bugs or need updates, community support may be limited.
Install
laion-clap on PyPI
Before you install
Low install friction with a pure Python wheel. Maintenance is aging—last commit was 2025-05-15 and the package has not been updated in 467 days—but the repository remains active and has 2250 stars. The 18 runtime dependencies are substantial and include heavy libraries like transformers, librosa, and torch-related packages.
Audio must be resampled to 48000 Hz. Requires PyTorch and librosa; model checkpoint is downloaded on first load_ckpt() call.
License in practice
Released under CC0 1.0 Universal, which places the work in the public domain with no copyright restrictions. You may use, modify, and distribute it freely for any purpose, including commercial, with no attribution requirement.
Quickstart
pip install laion-clap
import laion_clap
import librosa
model = laion_clap.CLAP_Module(enable_fusion=False)
model.load_ckpt()
audio_data, _ = librosa.load('audio.wav', sr=48000)
audio_data = audio_data.reshape(1, -1)
audio_embed = model.get_audio_embedding_from_data(x=audio_data, use_tensor=False)
text_embed = model.get_text_embedding(["dog barking"])
Verify before relying
- Whether pretrained checkpoints (630k-audioset-best.pt, music_audioset_epoch_15_esc_90.14.pt, etc.) remain reliably available from HuggingFace.
- Whether the aging maintenance status (467 days since last release) signals planned deprecation or stable maturity.
- Performance and memory footprint of the larger audio encoder models (HTSAT-base) on typical hardware.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 18 packagesnumpysoundfilelibrosatorchlibrosaftfybraceexpandwebdatasetwgetwandbllvmlitescipyscikit-learnpandash5pytqdmregextransformersprogressbar |
| Maintenance | Aging 467 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 94,890 / month, #13,300 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseTopic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: laion_clap-1.1.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “text-to-audio retrieval”
- laion-clapExtracts learned audio and text embeddings using contrastive…
- vocosVocos is a neural vocoder that synthesizes audio waveforms from…
- llama-index-retrievers-bm25Integrates BM25 full-text search retrieval into LlamaIndex…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also snac · open-clip-torch · speechbrain · panns-inference · torchaudio · openunmix · resemble-perth · torchfcpe · mlx-audio