--- library_name: onnx pipeline_tag: feature-extraction tags: - eidora - eidora-model-zoo - onnx - onnxruntime - embeddings - audio license: bsd-3-clause base_model: MIT/ast-finetuned-audioset-10-10-0.4593 --- # AST Audio 768 — General Audio Embeddings This EIDORA version of the Audio Spectrogram Transformer turns a short audio excerpt into a single vector. It uses the sound-event-trained AST encoder, not its original audio-event classifier. ## Recommended Use Choose AST when the sounds around speech matter as much as the speech itself. It offers a starting point for grouping recordings with similar acoustic textures or for comparing short audio segments in a collection. Listening to representative examples is still important: a cluster may reflect recording quality or background noise rather than the event you are investigating. ## Limitations - The output does not identify sound events, transcribe words, or label emotions. - Only the configured ten-second excerpt is represented. An event elsewhere in a longer recording will not contribute to that vector. - The source checkpoint was fine-tuned on general AudioSet sounds, so its distances may be less meaningful for recordings with very different acoustic characteristics. ## Input **What you provide:** an audio recording. EIDORA prepares a mono waveform excerpt before ONNX inference. | ONNX input | Type | Shape | Prepared from | | --- | --- | --- | --- | | `waveform` | `float32` | `[1, 160000]` | waveform | | `valid_samples` | `int64` | `[1]` | valid_samples | ## Output `embedding` is `float32` with shape `[1, 768]`. The **768-dimensional** embedding is **L2-normalized** for **cosine similarity**. It represents the selected audio excerpt rather than a transcript or class probabilities. ## Preprocessing 1. Decode to **mono** audio at **16,000 Hz**. 2. Use the **beginning** 10-second excerpt (**160,000 samples**). Pad shorter inputs and pass the actual length using `valid_samples`. 3. Supply the prepared waveform to ONNX. The AST-compatible spectrogram/filterbank preparation is integrated into the ONNX graph. ## Model Source and Architecture AST is a transformer applied to an audio spectrogram. In this EIDORA adaptation, the audio-event classification head is not returned. The exported output uses the AST pooler representation from the classification and distillation tokens, followed by L2 normalization. ## Training Data and Checkpoint Provenance - **Upstream checkpoint:** [`MIT/ast-finetuned-audioset-10-10-0.4593`](https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593). - **Pinned revision:** Not specified in the supplied package metadata. The source checkpoint is the AudioSet-fine-tuned MIT AST model. AudioSet is an audio-event dataset; its labels are not returned by the EIDORA embedding graph. No additional task-specific training is declared for this export. ## Research Context **Research paper:** [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) Gong, Chung and Glass describe how transformer attention can model spectrogram patches for sound-event recognition. The architecture is useful here as a source of general acoustic features, while EIDORA repurposes it for comparison rather than direct classification. ## Attribution and Licensing The source checkpoint is listed under BSD-3-Clause, as is the EIDORA package metadata. Credit belongs to the AST authors and the MIT checkpoint maintainers. The EIDORA package is an ONNX embedding adaptation, not the original sound-event classifier. ## References - **Research paper:** [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) - **Source checkpoint:** [MIT/ast-finetuned-audioset-10-10-0.4593](https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593) **Suggested research citation (from the packaged configuration):** ```bibtex @inproceedings{gong2021ast, title={AST: Audio Spectrogram Transformer}, author={Gong, Yuan and Chung, Yu-An and Glass, James}, booktitle={Interspeech}, year={2021}, doi={10.21437/Interspeech.2021-698}, url={https://arxiv.org/abs/2104.01778} } ``` ## Package Information - **Repository:** `EIDORA/AST_Audio_768` - **Package schema / version:** `3` / `1.0.0` - **Modality:** `audio` - **ONNX graph(s):** `model.onnx` - **Configuration:** `config.yaml` - **Declared ONNX Runtime providers:** `CUDAExecutionProvider`, `CPUExecutionProvider`, `CoreMLExecutionProvider` Execution-provider availability depends on the user’s EIDORA installation, operating system and hardware. The declared providers are configuration options, not a guarantee of equal speed or identical hardware use. The `config.yaml` file defines the exact runtime input/output contract.