Instructions to use OpenASR/firered-punc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenASR
How to use OpenASR/firered-punc with OpenASR:
# Install the openasr CLI: https://github.com/QuintinShaw/openasr/releases openasr pull firered-punc openasr transcribe audio.wav --model firered-punc
- Notebooks
- Google Colab
- Kaggle
Commit Β·
61306bc
verified Β·
0
Parent(s):
publish firered-punc OpenASR packs
Browse files- .gitattributes +1 -0
- README.md +111 -0
- firered-punc-fp16.oasr +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
*.oasr filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: FireRedTeam/FireRedPunc
|
| 4 |
+
pipeline_tag: automatic-speech-recognition
|
| 5 |
+
library_name: openasr
|
| 6 |
+
tags:
|
| 7 |
+
- openasr
|
| 8 |
+
- oasr
|
| 9 |
+
- firered-punc
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
<div align="center">
|
| 13 |
+
|
| 14 |
+
# FireRedPunc Β· OpenASR
|
| 15 |
+
|
| 16 |
+
**Chinese punctuation restoration for OpenASR -- a BERT token classifier that adds full-width marks to unpunctuated transcripts, fully on-device**
|
| 17 |
+
|
| 18 |
+
[](https://huggingface.co/FireRedTeam/FireRedPunc)
|
| 19 |
+
[](https://github.com/QuintinShaw/openasr)
|
| 20 |
+
[](https://openasr.org)
|
| 21 |
+
[](https://huggingface.co/FireRedTeam/FireRedPunc)
|
| 22 |
+
|
| 23 |
+
A capability-pack support model for the **[OpenASR](https://github.com/QuintinShaw/openasr)**
|
| 24 |
+
runtime β pure-Rust inference, **no Python at inference time**. Not a standalone
|
| 25 |
+
transcription model: it augments another OpenASR ASR model's own decode path.
|
| 26 |
+
|
| 27 |
+
</div>
|
| 28 |
+
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
## β¨ Highlights
|
| 32 |
+
|
| 33 |
+
- πΆ **Chinese punctuation restoration** -- restores full-width `οΌγοΌοΌ` on an unpunctuated ASR transcript (e.g. Dolphin, FireRedASR2-AED) in a finalize-only post-processing pass
|
| 34 |
+
- π§ **BERT token classifier** -- a 12-layer `chinese-lert-base` encoder with a 5-class head predicting which of none/οΌγοΌοΌ follows each subword
|
| 35 |
+
- π¨π³ **Chinese-only by construction** -- the released label set has no English half-width marks, so only Chinese text is punctuated
|
| 36 |
+
- π **Opt-in and auto-gated** -- runs only when the ASR model is unpunctuated and this pack is installed, so punctuating families are never double-punctuated
|
| 37 |
+
- π¦ **Native in OpenASR** β `.oasr` packs run with no Python at inference, engineered for peak performance on CPU & GPU
|
| 38 |
+
|
| 39 |
+
## π Quickstart
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
# 1. Install the OpenASR CLI Β· https://openasr.org
|
| 43 |
+
# 2. Pull the pack
|
| 44 |
+
openasr pull firered-punc:fp16
|
| 45 |
+
|
| 46 |
+
# 3. Use it as an opt-in refinement for another model's transcribe call
|
| 47 |
+
openasr transcribe meeting.wav --model <asr-model> --word-timestamps=aligned
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
## π¦ Pack
|
| 51 |
+
|
| 52 |
+
| Quant | File (`.oasr`) | Size |
|
| 53 |
+
|:------|:---------------|-----:|
|
| 54 |
+
| fp16 | `firered-punc-fp16.oasr` | 204 MB |
|
| 55 |
+
|
| 56 |
+
## π§ About FireRedPunc
|
| 57 |
+
|
| 58 |
+
FireRedPunc is a **punctuation-prediction** model from **FireRedTeam**, part of the
|
| 59 |
+
FireRedASR2S all-in-one ASR system. It adopts a BERT-style encoder initialized from
|
| 60 |
+
`chinese-lert-base` (a 12-layer, 768-hidden, 12-head BERT) with a token-classification head
|
| 61 |
+
that predicts, for each subword, which of five classes follows it: none, or one of the four
|
| 62 |
+
Chinese full-width marks `οΌ`, `γ`, `οΌ`, `οΌ`. It is a text-in / labels-out post-processor,
|
| 63 |
+
not an ASR model -- no audio frontend, no autoregressive decode.
|
| 64 |
+
|
| 65 |
+
In OpenASR it is packaged as an optional **punctuation capability pack**: an unpunctuated
|
| 66 |
+
family's finished transcript (e.g. Dolphin or FireRedASR2-AED) is passed through the classifier
|
| 67 |
+
once, and the predicted marks are re-inserted into the original characters. The stage is
|
| 68 |
+
auto-gated on the ASR model's catalog `emits_punctuation == false` and only runs when this pack
|
| 69 |
+
is installed, so punctuating families are never double-punctuated. Because the released label
|
| 70 |
+
set is Chinese-only, the integration is Chinese-only by construction (the architecture cannot
|
| 71 |
+
emit English half-width marks).
|
| 72 |
+
|
| 73 |
+
This OpenASR repo repackages the upstream weights as `.oasr` packs that run natively in the
|
| 74 |
+
OpenASR runtime -- no Python at inference, all decoding local. It ships in **fp16**.
|
| 75 |
+
|
| 76 |
+
**Not a standalone transcription model.** This pack cannot transcribe audio by itself; it is an
|
| 77 |
+
opt-in post-process applied to an unpunctuated ASR model's output.
|
| 78 |
+
|
| 79 |
+
**Verification status:** this is a brand-new catalog entry (no prior public listing). Local
|
| 80 |
+
verification covers exact per-token label parity against the upstream PyTorch forward across a
|
| 81 |
+
set of Chinese golden sentences (all four punctuation classes plus the no-mark class). This
|
| 82 |
+
pack is staged in a private repo, not yet publicly listed.
|
| 83 |
+
|
| 84 |
+
## βοΈ How this pack was made
|
| 85 |
+
|
| 86 |
+
Converted from [FireRedTeam/FireRedPunc](https://huggingface.co/FireRedTeam/FireRedPunc) with the OpenASR local-source
|
| 87 |
+
converter (`convert_local_qwen_forced_aligner_source_to_runtime_pack`, not yet wired
|
| 88 |
+
to a public `openasr model-pack import` subcommand -- the pack format and tensor
|
| 89 |
+
mapping are stable, but CLI/family-registry wiring is a separate stage).
|
| 90 |
+
|
| 91 |
+
The `.oasr` container is GGUF-backed; packs use zero-copy mmap weight binding.
|
| 92 |
+
|
| 93 |
+
## βοΈ License
|
| 94 |
+
|
| 95 |
+
This pack **inherits the upstream model's license: Apache-2.0**
|
| 96 |
+
([source](https://huggingface.co/FireRedTeam/FireRedPunc)). OpenASR packaging retains the upstream copyright;
|
| 97 |
+
the only modifications are format conversion and quantization.
|
| 98 |
+
|
| 99 |
+
## π Acknowledgements
|
| 100 |
+
|
| 101 |
+
This pack is a redistribution of **FireRedPunc**, created and open-sourced by **FireRedTeam**
|
| 102 |
+
([FireRedTeam/FireRedPunc](https://huggingface.co/FireRedTeam/FireRedPunc)). All credit for the
|
| 103 |
+
original architecture, training, and weights belongs to the authors; the license is inherited
|
| 104 |
+
from and identical to the upstream model (Apache-2.0). OpenASR only performs format conversion,
|
| 105 |
+
runtime verification, and local-inference adaptation.
|
| 106 |
+
|
| 107 |
+
## π Links
|
| 108 |
+
|
| 109 |
+
- π¦ **OpenASR** β <https://github.com/QuintinShaw/openasr>
|
| 110 |
+
- π **Website** β <https://openasr.org>
|
| 111 |
+
- π€ **Upstream model** β [FireRedTeam/FireRedPunc](https://huggingface.co/FireRedTeam/FireRedPunc)
|
firered-punc-fp16.oasr
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:95033ed3842e5399f6eec430c28950d34ecba0b41d0c0f7069ccbd8280f48234
|
| 3 |
+
size 203631008
|