Nemotron 流式
Nemotron-Speech-Streaming-0.6B 是 NVIDIA 的低延迟英语流式 ASR:缓存感知 FastConformer 编码器与 RNN-T 解码器配对,原生标点和大小写作为普通 BPE 词元直接输出。本站提供的 CoreML 模型包含 INT8 调色板量化的编码器,运行于 Apple Neural Engine。
概览
- 原生标点和大小写 — 无需后处理;句号、逗号和大小写都是词表的一部分
- 6 亿参数 — 比 Parakeet-EOU (120M) 更大,在复杂音频上的转录质量显著更高
- 缓存感知 FastConformer — 24 层编码器,注意力和卷积缓存在分块间流动以保持连续上下文
- 四种分块大小 — 每次推理 80、160、560、1120 ms(160 ms 为默认,也是当前发布的版本)
- 仅英语 — 仅在英语语音上训练;如需多语言请参考 Qwen3-ASR 或 Omnilingual ASR
架构
每个音频块流水执行三个 CoreML 模型:
| Component | Description |
|---|---|
| 编码器 | 24-layer cache-aware FastConformer, 1024 hidden. Takes a 17-frame mel chunk (160 ms default) plus five state tensors — attention KV cache [24, 1, 70, 1024], depthwise conv cache [24, 1, 1024, 8], and a pre_cache mel loopback that prepends recent-past audio so chunk boundaries stay continuous. |
| 解码器 | Two-layer LSTM prediction network, 640 hidden. Consumes the previous non-blank token, emits an embedding plus updated (h, c) state. |
| Joint | Fuses encoder and decoder outputs into logits over 1024 BPE tokens + blank. Punctuation and capitalization are just more tokens in the BPE vocab — no extra heads. |
没有 EOU 头
与 Parakeet-EOU 不同,Nemotron 不发出专用的发话结束词元。两种方法将连续音频分割为发话:
- 外部 VAD — 将会话与 Silero VAD 配对;在持续静音时调用
finalize()提交当前发话,createSession()创建下一个会话。 - 标点边界 — 当部分转录以
.、?或!结尾时,将其视为自然的提交信号。无需额外模型,但依赖音频实际触发终止标点。
模型
| Component | Size | HuggingFace |
|---|---|---|
| Encoder (INT8) | 562 MB | aufklarer/Nemotron-Speech-Streaming-0.6B-CoreML-INT8 |
| Decoder | 14 MB | |
| Joint | 3.3 MB |
Upstream: nvidia/nemotron-speech-streaming-en-0.6b (NeMo .nemo 检查点)。
快速开始 — 批量转录
遵循 SpeechRecognitionModel 协议,可直接用于任何接受通用 STT 模型的代码路径:
import NemotronStreamingASR
let model = try await NemotronStreamingASRModel.fromPretrained()
let text = try model.transcribeAudio(audioSamples, sampleRate: 16000)
快速开始 — 异步流式
for await partial in model.transcribeStream(audio: samples, sampleRate: 16000) {
if partial.isFinal { print("FINAL: \(partial.text)") }
else { print("... \(partial.text)") }
}
每个 PartialTranscript 携带 text、isFinal(仅 finalize() 后的最后一个分片为 true)、confidence 和单调递增的 segmentIndex。
长期会话 API(麦克风输入)
let session = try model.createSession()
// each mic chunk:
let partials = try session.pushAudio(float32Chunk16kHz)
for p in partials { showPartial(p.text) } // isFinal is false mid-stream
// when the utterance ends (VAD silence or explicit stop):
let trailing = try session.finalize()
for p in trailing { commit(p.text) }
命令行
audio transcribe recording.wav --engine nemotron # batch
audio transcribe recording.wav --engine nemotron --stream # streaming final
audio transcribe recording.wav --engine nemotron --stream --partial # with partials
Nemotron 与 Parakeet-EOU 对比
| Nemotron 流式 0.6B | Parakeet-EOU 120M | |
|---|---|---|
| 参数 | 600M | 120M |
| Encoder | 24 层 FastConformer,1024 隐藏维 | 17 层 FastConformer,512 隐藏维 |
| Decoder | 2 层 LSTM,RNN-T | 1 层 LSTM,RNN-T |
| EOU 检测 | 外部(VAD 或标点) | 内置 <EOU> 词元 |
| 标点 | 原生内嵌 BPE 词元 | 无(后处理) |
| 语言 | 仅英语 | 25 种欧洲语言 |
| 默认分块 | 160 ms | 320 ms |
| 模型包大小 | ~580 MB | ~150 MB |
何时选择 Nemotron…
当你需要高质量英语转录,带开箱即用的标点和大小写,并且愿意自行分段话语(通过 VAD 或标点提示)时。对于需要内置 EOU 信号的受限 iOS 听写,Parakeet-EOU 仍然是更小、更简单的选择。