zero-shot-audio-classification · music + speech · 207.05 MB WASM q8 · Apache-2.0

Larger-CLAP Music & Speech — 512-d Audio-Text Space for Songs & Voices

LAION's larger HTSAT-large (1024-d) + RoBERTa (768-d) CLAP checkpoint trained specifically on music and speech audio-text pairs. Score any 48 kHz clip, uploaded track, or live microphone recording against arbitrary free-text tags locally in 207.05 MB (q8 CPU WASM via shared ../../lib/webai.js on @huggingface/transformers@3.7.5).

Model Card & Runtime Contract

Task & Projection
zero-shot-audio-classification · 512-d joint audio/text embeddings
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, unfused) + RoBERTa (768-d) · Apache-2.0
Distinct from built clap-zero-shot-audio (clap-htsat-unfused): This checkpoint uses the larger HTSAT-large audio backbone (hidden_size=1024, patch_embeds_hidden_size=128 vs base 768/96) trained specifically on Music + Speech datasets rather than general environmental sounds. config.json declares logit_scale_init_value: 14.2857 (1/0.07) and unfused repeatpad / rand_trunc 10 s framing.

Load & Cache Status

Live Zero-Shot Music & Speech Classifier

Drop, paste, or choose any audio clip (.wav, .mp3, .ogg, .flac, .m4a, .webm) — decoded locally to 48 kHz mono.
Click to record voice, humming, or instruments 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 prompt 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-prompt RoBERTa token count, cosine similarity, scaled logit, and softmax probability
    Rank Prompt 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 LargerClapEngine lifecycle & dispose client (clap-music-client.js)