Persian (Farsi) speech recognition, Core ML int8

A Farsi speech recognition model (CTC, 300M parameters) as a compiled Core ML package for iPhone. It is a format conversion of Peacockery/omni-ctc-300m-farsi. No retraining. It runs on the Neural Engine, so it keeps working while an app is in the background (MLX needs the GPU, which iOS does not allow there).

Source and licence

  • Source model: Peacockery/omni-ctc-300m-farsi, revision 2c70389c4009ecb0776c9644db19308f1c1e8ae5, Apache-2.0. A Farsi fine-tune by Peacockery on 985 hours of Farsi speech.
  • Base model of that fine-tune: facebook/omniASR-CTC-300M, revision 8e35f0cc28fa6099e0c14d56db85ce0423baa691, Apache-2.0, Copyright 2025 (c) Meta Platforms, Inc. and affiliates.
  • Licence of this repository: Apache License 2.0 (text). LICENSE holds the full text and NOTICE the credits.
  • Change made: weight format and numeric precision only (see Conversion).
  • Part of the fine-tuning data is web-scraped audio (including about 205 hours of Farsi YouTube) with machine-generated labels. See the source model card for the full list of sources and their terms.

Files

  • FarsiCTC.mlmodelc/: compiled Core ML ML Program with int8 per-channel symmetric weights (326,855,776 bytes of weights). Input audio, shape (1, 160000): 10 seconds of 16 kHz mono audio, layer-normalised and zero-padded. Output logits, shape (1, 499, 10288).
  • tokenizer.model: the SentencePiece tokenizer the checkpoint expects, the source model's omniASR_tokenizer_written_v2.model, byte for byte (sha256 8aa11a10...0b1e).

Conversion

coremltools 8.1, torch 2.5.1, Python 3.11. A traced PyTorch port becomes an fp16 ML Program, then gets int8 linear symmetric per-channel weight quantisation, then compiles with xcrun coremlcompiler compile. Decoding is greedy CTC over the valid frames. Longer audio is cut into 10 second windows at the quietest 100 ms.

Measured quality

FLEURS fa_ir test split: 871 clips, 21,494 reference words. One normaliser scores every row (NFKC, ZWNJ to space, Arabic letters to Persian letters, digits to ASCII, diacritics and punctuation removed). This is our own run and nobody has verified it independently.

Model WER CER
fp32 PyTorch (reference) 11.49% 3.25%
Core ML int8 (this repository), CPU 11.79% 3.84%

The MLX 8-bit conversion of the same model scores 11.48% WER on the same clips. The source model card reports a lower figure for FLEURS with its own text normalisation and scoring. The numbers are not comparable. FLEURS training data was part of the fine-tune's training set, so these are in-domain results.

Limits

The test data is read speech in the FLEURS domain. Accuracy on casual, noisy or accented speech is lower, and we have not measured by how much. The model covers Farsi only; it does not support Urdu or Arabic. One call takes exactly 10 seconds (shorter audio is padded).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for codeclawd/persian-ctc-300m-coreml-int8

Quantized
(2)
this model