Mothor sound model
Core ML conversion of CLAP for audio search on Mac
2 min readupdated
The model is an optimized version of the CLAP architecture (Contrastive Language-Audio Pretraining — a model for matching text and audio) based on laion/larger_clap_general, converted to the Core ML format for local execution within the Mothor application on macOS. It is split into two parts: an audio tower (quantized to int8) and a text tower (in float16 format) for fast matching of sound samples and text descriptions. The tool is used for text-based search across a sound library, finding similar audio files, and automated tagging directly on the user device. The conversion was performed without weight retraining, restructuring the computation graph for maximum performance on Apple Silicon processors.
Key features
- Full compatibility with macOS via the native Core ML format
- Audio tower with 8-bit quantization (int8) to save memory
- Text tower in half-precision (float16)
- High preservation accuracy relative to the original (weight cosine similarity of at least 0.999)
What you can do
- Integrate the model into a macOS application for local sound library search
- Implement text-based sound search by description on Apple devices
- Set up automated audio file tagging without sending data to the cloud
- Use audio and text embeddings to build similar-sound search systems
Example
The model is designed for integration into applications via Core ML and expects fixed input data: 10-second log-mel spectrograms for audio and tokens up to length 77 for text.
Read more
DetailsBase model: laion/larger_clap_general
Library: coreml
License: Apache-2.0
Audio input: fixed 10-second window (1x1x1001x64 spectrogram), output is a 512-dimensional embedding
Text input: 77 tokens with mask, output is a 512-dimensional embedding










Comments