Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
language: [en, de]
|
| 4 |
+
tags: [automatic-speech-recognition, onnx, onnx-asr, whisper, verbatim-asr]
|
| 5 |
+
base_model: nyrahealth/CrisperWhisper
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# CrisperWhisper — ONNX
|
| 9 |
+
|
| 10 |
+
ONNX export of [nyrahealth/CrisperWhisper](https://huggingface.co/nyrahealth/CrisperWhisper)
|
| 11 |
+
(Whisper large-v3 fine-tuned for verbatim transcription — includes filler words,
|
| 12 |
+
disfluencies, pauses) for [onnx-asr](https://github.com/istupakov/onnx-asr) (standard
|
| 13 |
+
`whisper` model type — works with stock onnx-asr, no patches needed). Addresses
|
| 14 |
+
[onnx-asr#140](https://github.com/istupakov/onnx-asr/issues/140).
|
| 15 |
+
|
| 16 |
+
fp32 and int8 variants included; int8 decoder produced by quantizing the pre-merge
|
| 17 |
+
decoders and re-merging (the merged graph's If-subgraphs defeat direct quantization).
|
| 18 |
+
|
| 19 |
+
**License**: original model is CC-BY-NC-4.0 (nyra health / nyralabs). This ONNX export
|
| 20 |
+
is a derivative, non-commercial use only, and inherits the same license and
|
| 21 |
+
attribution requirement. Credit: [nyrahealth/CrisperWhisper](https://huggingface.co/nyrahealth/CrisperWhisper).
|
| 22 |
+
|
| 23 |
+
**Export gotcha (fixed here)**: `optimum`'s ONNX export re-saves the tokenizer and
|
| 24 |
+
silently truncates CrisperWhisper's `vocab.json` (698KB vs the source repo's 878KB),
|
| 25 |
+
shifting every special-token ID (e.g. `<|startoftranscript|>` came out as 45073
|
| 26 |
+
instead of the correct 50258) and producing near-blank/looping decode output. This
|
| 27 |
+
export replaces `vocab.json`/`added_tokens.json` with the originals copied verbatim
|
| 28 |
+
from the source repo.
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
import onnx_asr
|
| 34 |
+
model = onnx_asr.load_model("whisper", "path/to/this/repo") # or quantization="int8"
|
| 35 |
+
print(model.recognize("audio_16khz.wav", language="en")) # or "de"
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
Verified on FLEURS English and German clips: fp32 and int8 outputs match each other
|
| 39 |
+
and the native `transformers` pipeline output exactly, for both languages. RTF on an
|
| 40 |
+
AMD Ryzen 5 7600 (6C/12T CPU, shared/loaded host): ~1.7-3.0 fp32, ~0.8-1.5 int8.
|