SeACo-Paraformer (Core ML)
English
Core ML conversion of SeACo-Paraformer by Tongyi Lab (FunASR): a non-autoregressive Mandarin recognizer that writes what it hears, handles mixed English, and takes hotwords to get names and terms right. Converted by Sixlab for cctype, a native macOS dictation app. Punctuation comes from the companion model cctype-ct-punc-zh.
Variants
| Folder | Weights | Size | |
|---|---|---|---|
original/ |
FP32, as converted | about 930 MB | Matches FunASR's own output |
8bit/ |
8-bit (linear symmetric), computation FP32 | about 240 MB | Smaller and faster load; rare differences on hard speech |
Both folders hold the same files, and run the same way. cctype offers both and shows which one is in use.
Measured by cctype on 10 Chinese and 10 mixed Chinese–English dictated sentences (one speaker, Apple M3, vocabulary as hotwords). With 10 sentences, one character moves the error rate by about 0.8 points:
| Chinese, character error rate | Mixed, character error rate | Time per sentence (4–8 s of speech) | |
|---|---|---|---|
original/ |
0.5% | 7.6% | 290 ms |
8bit/ |
0.5% | 7.6% | 290 ms |
English words split into many word pieces (Claude → c@@ la@@ u@@ de), which hotwords, aligned to the spoken syllables, cannot fill: for mixed speech with English names, see cctype-qwen3-asr-0.6b.
Files
| File | Inputs → outputs |
|---|---|
Encoder.mlpackage |
features [1, T, 560] → encoder [1, T, 512], CIF weights [1, T] |
Decoder.mlpackage |
encoder, acoustic embeddings [1, N, 512], hotword embeddings [1, K, 512] → token ids [1, N] |
HotwordEncoder.mlpackage |
hotword token ids [K, L] → LSTM states [L, K, 512] (take step length − 1 of each) |
tokens.json, seg_dict, am.mvn |
vocabulary, English word pieces, CMVN statistics (unchanged from FunASR) |
The decoder includes the SeACo bias decoder and FunASR's merge rule. The last hotword entry must
be [1] (<s>, "no hotword"); with only that entry the result equals plain decoding.
Features (Kaldi fbank, 80 bins, LFR 7/6, CMVN), CIF (threshold 1.0, tail 0.45) and text
post-processing run outside the models; cctype implements them in Swift (CCTypeCore).
Conversion
- Computation is FP32 in both variants: in FP16 the 50-layer encoder overflows.
8bit/stores the weights as 8-bit integers (linear symmetric). - Batch 1, unpadded inputs: attention masks come from input shapes, so lengths are flexible (up to 3000 feature frames, about 3 minutes; split longer audio).
- Verified against FunASR's own inference.
original/: identical text on every reference clip.8bit/: identical on the clean reference clips; on fast mixed Chinese–English speech a word can come out differently. With hotwords, cctype splits identifiers such asCCTypeinto the model's word pieces, which FunASR does not, so those words come out better than in FunASR. - Runs best with
MLComputeUnits.cpuOnly: input lengths vary every call, and the GPU recompiles for each new shape.
Conversion scripts: Tools/paraformer in the cctype repository (convert.py, quantize.py,
verify.py, package.py).
License
Apache License 2.0, as the original model. The original model is the work of Tongyi Lab / FunASR; this repository only converts it.
中文
通义实验室 FunASR 的 SeACo-Paraformer 的 Core ML 版本。非自回归的中文识别模型,听到什么写什么,可以中英混说;支持热词,人名和专有名词更准。由 Sixlab 转换,用于原生 macOS 语音输入应用 cctype。标点由配套模型 cctype-ct-punc-zh 提供。
版本
| 文件夹 | 权重 | 大小 | |
|---|---|---|---|
original/ |
FP32,转换原样 | 约 930 MB | 与 FunASR 官方结果一致 |
8bit/ |
8 位(线性对称量化),计算 FP32 | 约 240 MB | 体积小、加载快;难度高的语音偶有差异 |
两个文件夹的文件和用法完全相同。cctype 两种都提供,并标明当前用的是哪一种。
cctype 用 10 句纯中文和 10 句中英混说的听写录音实测(一位说话人,Apple M3,词汇作为热词)。每组只有 10 句,错一个字字错率就变化约 0.8 个百分点:
| 纯中文字错率 | 中英混合字错率 | 每句耗时(4–8 秒语音) | |
|---|---|---|---|
original/ |
0.5% | 7.6% | 290 ms |
8bit/ |
0.5% | 7.6% | 290 ms |
英文单词会被拆成很多词片(Claude → c@@ la@@ u@@ de),而热词按说出的音节对齐,填不进这么多词片:夹带英文专有名词的中英混说,请用 cctype-qwen3-asr-0.6b。
文件
| 文件 | 输入 → 输出 |
|---|---|
Encoder.mlpackage |
特征 [1, T, 560] → 编码 [1, T, 512]、CIF 权重 [1, T] |
Decoder.mlpackage |
编码、声学向量 [1, N, 512]、热词向量 [1, K, 512] → token id [1, N] |
HotwordEncoder.mlpackage |
热词 token id [K, L] → LSTM 状态 [L, K, 512](每个热词取第 长度 − 1 步) |
tokens.json、seg_dict、am.mvn |
词表、英文分词、CMVN 统计(与 FunASR 相同) |
解码器包含 SeACo 偏置解码器和 FunASR 的合并规则。热词列表最后一项必须是 [1](<s>,表示“无热词”);只有这一项时,结果与普通解码相同。
特征提取(Kaldi fbank,80 维,LFR 7/6,CMVN)、CIF(阈值 1.0,尾部 0.45)和文本后处理在模型之外完成;cctype 用 Swift 实现(CCTypeCore)。
转换
- 两个版本都用 FP32 计算:FP16 下 50 层编码器会溢出。
8bit/把权重存为 8 位整数(线性对称量化)。 - 批大小 1、输入不补齐:注意力掩码由输入形状生成,长度可变(最多 3000 个特征帧,约 3 分钟;更长的音频需要切段)。
- 与 FunASR 官方推理逐字比对。
original/:所有参考音频完全一致。8bit/:清晰的参考音频完全一致;语速快的中英混说偶尔会有个别词不同。带热词时,cctype 会把CCType这类标识符拆成模型自己的词片,FunASR 不会,所以这类词比 FunASR 识别得更好。 - 建议用
MLComputeUnits.cpuOnly:每次输入长度不同,GPU 会为每种新形状重新编译。
转换脚本在 cctype 仓库的 Tools/paraformer(convert.py、quantize.py、verify.py、package.py)。
许可证
Apache License 2.0,与原模型相同。原模型由通义实验室 / FunASR 开发,本仓库只做了格式转换。
- Downloads last month
- -