zero-shot-audio-classification · general acoustic · 207.05 MB WASM q8 · Apache-2.0

Larger-CLAP General — 512-d Audio-Text Space for Everyday Sounds

LAION's general-domain HTSAT-large (1024-d) + RoBERTa (768-d) CLAP checkpoint for environmental sounds, urban alerts, speech, and music. Classify any 48 kHz clip, uploaded file, or live microphone recording against arbitrary text labels in 207.05 MB (q8 CPU WASM via shared ../../lib/webai.js on @huggingface/transformers@3.7.5).

Model Card & Runtime Contract

Upstream Model
laion/larger_clap_general
Loaded ONNX Repo
Xenova/larger_clap_general
Tasks & Projection
zero-shot-audio-classification + 512-d audio/text projection
Backend & Quant
WASM · q8 (204.94 MB ONNX + 2.11 MB tok/cfg = 207.05 MB)
Audio Frontend
48,000 Hz mono · 64-band log-mel (50–14,000 Hz · n_fft=1024 · hop=480 · ≤10 s)
Architecture & License
HTSAT-large (1024-d, depths [2,2,12,2], unfused) + RoBERTa (768-d) · Apache-2.0
Distinct from sibling CLAP checkpoints: Compared to clap-zero-shot-audio (HTSAT-base 768-d) and larger-clap-music-and-speech (music & speech), laion/larger_clap_general pairs the larger HTSAT-large backbone with general environmental, urban, nature, speech, and music training data. Split projection weights (audio_model_quantized.onnx 78.16 MB + text_model_quantized.onnx 126.60 MB) also exist on the Hub; loading the unified model_quantized.onnx (204.94 MB) yields both logits_per_audio and 512-d embeddings in one pass.

Load & Cache Status

Live Zero-Shot General Audio Classifier

Drop, paste, or choose any audio clip (.wav, .mp3, .ogg, .flac, .m4a, .webm) — decoded locally to 48 kHz mono.
Click to record speech, ambient room sound, or music locally.
Loading sample… 48,000 Hz mono

Zero-Shot Softmax Probabilities & Raw Cosine Similarities

Load the model above to embed the 48 kHz audio and every custom label into CLAP's 512-d space.

    See Inside the Model (64-Band Log-Mel & 512-d Audio Tensor)

    64-Band Log-Mel Spectrogram (50 Hz – 14 kHz)

    Time left→right · frequency 50 Hz bottom → 14 kHz top · exact ClapFeatureExtractor geometry.

    512-d Audio Embedding Distribution

    Run inference to inspect the live 512-d projected audio vector and tensor shapes.

    Raw Tensor Readout (Cosine × Learned Scale = Logit → Softmax)

    Per-label RoBERTa token count, cosine similarity, scaled logit, and softmax probability
    Rank Candidate Label RoBERTa Tokens Raw Cosine Scaled Logit Softmax Prob
    Awaiting live inference…

    Why It Matters

    Show the Code (Off-Main-Thread CLAP Worker & Lifecycle)

    Show the code: Zero-shot audio classification + 512-d embeddings & 64-band log-mel (worker.js)
    Show the code: FIFO LargerClapGeneralEngine lifecycle & dispose client (clap-general-client.js)