An ONNX conversion of Meta's Omnilingual ASR CTC 300M model, omniASR_CTC_300M, for running with ONNX Runtime. It is intended for CTC forced alignment of known text, for example to get word start and end times for a transcript.
facebook/omniASR-CTC-300M, revision 8e35f0cc28fa6099e0c14d56db85ce0423baa691 (checkpoint omniASR-CTC-300M.pt, tokenizer omniASR_tokenizer.model).facebookresearch/omnilingual-asr, commit 81f51e224ce9e74b02cc2a3eaf21b2d91d743455; model card omniASR_CTC_300M (architecture 300m, tokenizer omniASR_tokenizer_v1).This is the v1 checkpoint. It is not omniASR_CTC_300M_v2, which has a different vocabulary (10288) and tokenizer (omniASR_tokenizer_written_v2).
| File | What it is |
|---|---|
model.onnx |
The model as a single ONNX file (FP32 weights, no external data). |
omniASR_tokenizer.model |
The upstream SentencePiece tokenizer, unchanged. |
vocab.json |
The same tokenizer as a lookup table (piece to id), with the blank, word-delimiter and special ids. |
LICENSE, NOTICE |
Apache License 2.0 and attribution. |
SHA256SUMS |
SHA-256 of every file. |
The weights are the upstream weights. Nothing was retrained, fine-tuned, pruned or quantised. The changes are:
transformers' Wav2Vec2ForCTC. The configuration is the upstream 300m architecture: the large_lv60k encoder (24 layers, width 1024, 16 heads, FFN 4096, pre-LN, layer-normed convolutional feature extractor with bias), a CTC head of 9812 outputs, and dropout and masking off for inference. The only checkpoint tensors not carried over are the training-time masking tensors (masker.*), which inference does not use.layer_norm(waveform, waveform.shape) with eps 1e-5 and no affine), was added at the start of the graph. Callers pass raw PCM.torch.onnx.export (TorchScript exporter, dynamo=False), opset 17, IR version 8, with a dynamic sample axis. Tool versions: torch 2.15.0, transformers 5.22.2, onnx 1.23.2. Checked with onnxruntime 1.31.1.metadata_props): sample_rate, frame_stride_samples, blank_id, word_delimiter_id, vocab_size, source_model, input, output.| Name | Type | Shape | Notes | |
|---|---|---|---|---|
| Input | audio |
float32 | [1, samples] |
Mono PCM at 16 000 Hz, samples in [-1, 1] (for 16-bit PCM, int16 / 32768). Pass it unnormalised: the graph normalises it. The batch size is fixed at 1. samples is dynamic, at least 400. |
| Output | logits |
float32 | [1, frames, 9812] |
Raw logits. There is no log_softmax in the graph. |
[10, 3, 3, 3, 3, 2, 2] and strides [5, 2, 2, 2, 2, 2, 2], with n = floor((n - kernel) / stride) + 1 at each layer. For example, 16 000 samples give 49 frames. Frame t covers samples starting at t * 320.<s> is the CTC blank. Id 4, a single space " ", is the word delimiter. Ids 1 <pad>, 2 </s> and 3 <unk> are special. Every other id is one character.omniASR_tokenizer.model is a SentencePiece model in which every piece is a single Unicode code point. vocab.json reproduces it without SentencePiece:
<unk>. Lowercase the text before looking it up.<unk>.<unk> (3) if there is none. A run of consecutive unknown code points gives a single <unk>.log_softmax over the logits. The reference used the columns other than ids 1, 2 and 3.torchaudio.functional.forced_align or an equivalent.frame * 320 / 16000 plus the segment's offset. The mean frame probability over a word's character frames can serve as its confidence score.Measured on internal Spanish test recordings: four recordings, 662 s of audio in 77 segments of up to 31.7 s, cut at pauses, with 902 words of known text.
| Check | Result |
|---|---|
Renamed PyTorch model vs fairseq2 0.6's own Wav2Vec2AsrModel (same checkpoint and input, CPU), all 77 segments, 33 060 frames |
max abs logit difference 0.0043; argmax equal on 100% of frames; forced-aligned word times identical for 902 of 902 words |
model.onnx on ONNX Runtime 1.31.1 (CPU execution provider) vs the PyTorch model (CPU), same segments |
max abs logit difference 0.016; max abs log-probability difference 0.020; argmax equal on 100% of frames; word times identical for 902 of 902 words |
| Variable input length | 400 to 720 123 samples, output frames as the formula above |
Tokeniser (vocab.json lookup vs SentencePiece) |
identical ids for the 902 words (as written and lowercased), 63 probe strings (English, Portuguese, French, German, digits, apostrophes, hyphens, other whitespace) and 20 000 random strings |
Speed, ONNX Runtime CPU execution provider with default threads, Apple M4 Max (12 performance + 4 efficiency cores): 2.2 to 4.0 s of session.run time per minute of audio, depending on the recording, and 2.5 and 3.1 s per minute over all 662 s in two runs. Session creation took 0.5 to 1.1 s. The peak resident memory of a process running only ONNX Runtime was 1.9 GB after loading, 2.6 GB with a 32 s input and 4.8 GB with a 60 s input.
CTC forced alignment of text that is already known, to get word and character timings. It can also produce greedy CTC transcripts (argmax, collapse repeats, drop blanks). For transcription, upstream reports lower error rates for its larger and LLM-ASR models.
Apache License 2.0, the licence of the upstream model and code. See LICENSE and NOTICE.
Omnilingual ASR models and code are by Meta Platforms, Inc. and affiliates, released under Apache 2.0. If you use this model in research, cite the upstream paper (BibTeX in the upstream README): Omnilingual ASR team, Omnilingual ASR: Open-Source Multilingual Speech Recognition for 1600+ Languages, 2025, arXiv:2511.09690.