EdgeASR / README.md
frankyoujian's picture
Add offline EdgeASR decoder and FFASR runtime materials
496a112 verified
|
Raw History Blame Contribute Delete
2.94 kB
---
license: cc-by-nc-4.0
language:
- en
pipeline_tag: automatic-speech-recognition
library_name: k2
tags:
- icefall
- zipformer
- transducer
- offline-asr
---
# EdgeASR — Offline English Zipformer
This is the user-provided offline English recognizer from
`english_only_v9_6w_offline_no_delay_penalty/epoch-30-avg-9`.
**This is an offline, non-streaming model.** Its non-causal encoder processes
the complete recording. This package does not provide a streaming state or
chunk-by-chunk inference API. The configuration sets `causal=false`,
`chunk_size=-1`, and `left_context_frames=-1`.
The checkpoint, token table, and BPE model are unchanged. Its configuration is
recorded in `model_config.json`. `artifact_manifest.json` records the exact
checkpoint and inference-source hashes. The supplied icefall source retains
its Apache 2.0 license in `source/LICENSE`. The weights use CC BY-NC 4.0,
matching the author's published `frankyoujian/EdgeASR` model card.
## FFASR inference
`evaluator.py` implements FFASR's `evaluate(path: pathlib.Path) -> str` interface.
It loads the model once, uses the supplied icefall `pretrained.py` model and
frontend, and performs greedy RNN-T decoding with at most one emitted symbol
per encoder frame. Evaluation uses FP32 and batch size 1. It uses no external
language model, prompts, reference transcripts, or dataset-specific decoding.
The frontend uses 16 kHz audio, 80-dimensional log-mel features, dither 0,
`snip_edges=False`, and `high_freq=-400`, matching the supplied inference
script. Audio with another sample rate is resampled to 16 kHz.
The pinned requirements target Linux x86-64, Python 3.12, and CUDA 12.4.
For local inference from a downloaded copy of this repository:
```bash
python -m pip install -r requirements.txt
export FFASR_MODEL_DIR="$PWD"
python -c 'from pathlib import Path; from evaluator import evaluate; print(evaluate(Path("sample.wav")))'
```
For Hub-based loading, set `FFASR_MODEL_ID=frankyoujian/EdgeASR` and
`FFASR_MODEL_REVISION` to the complete 40-character commit SHA. FFASR custom
evaluation uses an immutable revision. The evaluator enforces offline
configuration and returns the final formatted transcript.
## Output formatting
`<cap>` capitalizes the preceding word; `<upp>` uppercases it. `<.>`, `<,>`, and
`<?>` become ordinary punctuation. These formatting annotations are removed
after their effects are applied. Formatting does not correct words or apply
the benchmark's WER normalization.
Example:
```text
we <cap> are from us <upp> <,> and they are from china <cap> <.> who <cap> are they from <?>
```
```text
We are from US, and they are from China. Who are they from?
```
## Results
No FFASR score is claimed in this model card. Any official score must come from
the FFASR evaluation service after moderation and evaluation.
## Training data
A detailed training-data disclosure has not been supplied with this checkpoint.