OpenVoiceOS/cohere-transcribe-2b-onnx
Cohere Transcribe 2B — ONNX (nemo-conformer-aed)
ONNX export of CohereLabs/cohere-transcribe-03-2026 for onnx-asr.
Stock onnx-asr loads this model. No patches and no new model family are needed.
Despite the "2B ASR" framing, cohere_asr is not a speech-LLM. It is an attention encoder-decoder built on a NeMo FastConformer: CohereAsrConfig declares sub_configs = {"encoder_config": ParakeetEncoderConfig}, and its decoder prompt is token-for-token the NVIDIA Canary prompt. It therefore drops straight into the existing nemo-conformer-aed family that already serves Canary.
Usage
import onnx_asr
# straight from the Hub; the model type is read from config.json
model = onnx_asr.load_model("OpenVoiceOS/cohere-transcribe-2b-onnx", quantization="int8")
# or from a local copy
model = onnx_asr.load_model("nemo-conformer-aed", "path/to/this/repo")
print(model.recognize("audio_16khz.wav", language="en"))Drop quantization="int8" for the fp32 graphs.
language accepts any of the 14 supported codes: ar de el en es fr it ja ko nl pl pt vi zh. pnc=True|False toggles punctuation and capitalisation.
Graph contract
Two graphs, drop-in compatible with istupakov/canary-1b-v2-onnx:
Two details make the zero-patch fit work:
- The 1280 -> 1024
decoder.projlinear is folded into the encoder output, so the decoder graph sees 1024-dim memories exactly as the contract requires. - The HF
CohereAsrDecoderuses a standard transformers KV cache. The export re-expresses it as NeMo-styledecoder_mems(per-layer pre-layernorm hidden states,num_layers + 1 = 9entries), which is what the onnx-asr AED decode loop drives.
No feature extractor is baked into the graph. CohereAsrFeatureExtractor turned out to be the standard NeMo log-mel front end — dither 1e-5, preemphasis 0.97, n_fft 512 / win 400 / hop 160, symmetric Hann, 128 slaney mels, log(x + 2**-24), per-feature normalisation — so onnx-asr's built-in nemo128 preprocessor already matches it, down to the frame-count formula.
Files
fp32 total 8.3 GB, int8 total 2.1 GB.
Accuracy
Four FLEURS clips (2 en, 2 pt), greedy decoding, against native transformers on the same clips.
fp32 is exact. int8 dynamic quantisation costs a little accuracy — observed drift is a spurious comma and a mis-spelled rare proper noun. Session-swapping shows both graphs contribute (encoder int8 alone: 3/4 drift; decoder int8 alone: 2/4 drift), so there is no single subgraph to exclude. Use fp32 when accuracy matters and int8 when size matters.
Note: onnx-asr's built-in detokeniser drops the space before an opening bracket or quote (sugar(especially). That is upstream onnx-asr behaviour shared with Canary, not an export defect — the token ids are identical.
Speed
AMD Ryzen 5 7600 (6 cores / 12 threads), CPU execution provider, OMP_NUM_THREADS=6, nice -n 10.
Scope
Single-clip transcription only. The source processor splits audio longer than 35 s at low-energy boundaries and stitches the pieces back together; that chunking is not part of this export. Feed clips under about 30 s, or segment them yourself.
Attribution
Source model and weights: Cohere Labs, CohereLabs/cohere-transcribe-03-2026, Apache-2.0. This repository contains only an ONNX conversion; the license is inherited unchanged.
