File size: 2,923 Bytes
9dd2fd9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
license: cc-by-4.0
library_name: onnx
pipeline_tag: automatic-speech-recognition
language:
- ar
tags:
- quran
- quranic-arabic
- fastconformer
- onnx
- int8
- streaming
- speech-recognition
base_model: mohammed/fastconformer-quran-ar
---

# FastConformer Quran — int8 ONNX (stateless export)

A mirror of [mohammed/fastconformer-quran-ar-onnx-int8](https://huggingface.co/mohammed/fastconformer-quran-ar-onnx-int8)
(**CC-BY-4.0**), packaged for the on-device recitation engine of the
[Voidwave Quran](https://voidwave.com/Quran) web app (runs fully in the browser via `onnxruntime-web`).

The base model is a Qatar Computing-style FastConformer fine-tuned on Quranic recitations
(NVIDIA NeMo, `tarteel-ai/everyayah`). This export is fully causal `[128, 0]` — no caches in or out —
so a plain stateless loop decodes it one token per encoder frame (greedy).

## Files

| file | size | what it is |
|---|---|---|
| `encoder.int8.onnx` | ~126 MB | streaming encoder: `audio_signal [1, 80, T]` + `length [1]` → `[1, 512, T/8]` + `encoded_lengths` |
| `decoder.int8.onnx` | ~5 MB | **fused decoder_joint**: `encoder_outputs [1, 512, 1]`, `targets [1, 1]`, `target_length [1]`, `input_states_1/2 [1, 1, 640]` → joint logits `[1, 1, 1, 1025]` + output states |
| `tokens.txt` | ~13 KB | 1025 entries: 1024 BPE tokens (with diacritics) + `<blk>` at id 1024 |
| `meta.json` | <1 KB | upstream metadata |

Notes:

- The upstream `joiner.int8.onnx` is a **byte-identical duplicate** of `decoder.int8.onnx` and is omitted here.
- Runs on `onnxruntime-web` **≥ 1.30** (wasm kernels; earlier runtimes lack the quantized `ConvInteger` op).
- Input features must be NeMo-style log-mel: 80 filters, 25 ms window / 10 ms hop, `n_fft` 512, slaney mel,
  `log(x + 2^-24)`, and **per-feature normalization is required** — despite `meta.json` claiming
  `normalize_type: ""` (upstream metadata is wrong on this point; without normalization the decoder emits
  an empty result).

## Usage (browser, onnxruntime-web)

```js
const ort = await import('https://cdn.jsdelivr.net/npm/onnxruntime-web@1.30.0/dist/ort.min.js');
const encoder = await ort.InferenceSession.create('encoder.int8.onnx', { executionProviders: ['wasm'] });
const decoder = await ort.InferenceSession.create('decoder.int8.onnx', { executionProviders: ['wasm'] });
// feature extraction: NeMo-compatible mel + per-feature normalization (see notes above)
// decoding: encoder → per-frame greedy join with a single re-primed predictor state
```

## Attribution

- Base model: [mohammed/fastconformer-quran-ar](https://huggingface.co/mohammed/fastconformer-quran-ar)
  (NVIDIA NeMo FastConformer, fine-tuned on `tarteel-ai/everyayah`)
- Original ONNX export: [mohammed/fastconformer-quran-ar-onnx-int8](https://huggingface.co/mohammed/fastconformer-quran-ar-onnx-int8)
- License: **CC-BY-4.0** (see upstream) — please keep this attribution when redistributing.