Voice-text contrastive embedding model — the larger of the two anchors
released with VoiceNet.
VoiceCLAP-Large is a
single-tower model: a rank-16 LoRA finetune of
LCO-Embedding-Omni-7B
(Qwen2.5-Omni-Thinker-7B backbone with a sentence-transformer
last-token-pooling head) trained with the symmetric InfoNCE loss. The audio
and text embeddings are produced by the same backbone — the modality is
determined by what is fed in via the multimodal chat template.
1import librosa
2from sentence_transformers import SentenceTransformer
3
4model = SentenceTransformer("laion/voiceclap-large", trust_remote_code=True)
5
6# Text embedding (3 584-d, L2-normalised)
7text_emb = model.encode(["a calm and steady voice"])
8
9# Audio embedding — the Whisper-derived audio tower expects 16 kHz mono.
10arr, _ = librosa.load("clip.wav", sr=16000, mono=True)
11audio_emb = model.encode([{"array": arr, "sampling_rate": 16000}])
12
13# Cosine similarity (embeddings already L2-normalised)
14print((audio_emb @ text_emb.T).item())
1import soundfile as sf
2arr, sr = sf.read("clip_16k.wav")
3assert sr == 16000, "audio must be 16 kHz mono — resample first if not"
4audio_emb = model.encode([{"array": arr, "sampling_rate": 16000}])
If you use this model, please cite the VoiceNet paper.