Nemotron 流式

Nemotron-Speech-Streaming-0.6B 是 NVIDIA 的低延迟英语流式 ASR:缓存感知 FastConformer 编码器与 RNN-T 解码器配对,原生标点和大小写作为普通 BPE 词元直接输出。本站提供的 CoreML 模型包含 INT8 调色板量化的编码器,运行于 Apple Neural Engine。

概览

架构

每个音频块流水执行三个 CoreML 模型:

ComponentDescription
编码器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.
JointFuses 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 不发出专用的发话结束词元。两种方法将连续音频分割为发话:

  1. 外部 VAD — 将会话与 Silero VAD 配对;在持续静音时调用 finalize() 提交当前发话,createSession() 创建下一个会话。
  2. 标点边界 — 当部分转录以 .?! 结尾时,将其视为自然的提交信号。无需额外模型,但依赖音频实际触发终止标点。

模型

ComponentSizeHuggingFace
Encoder (INT8)562 MBaufklarer/Nemotron-Speech-Streaming-0.6B-CoreML-INT8
Decoder14 MB
Joint3.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 携带 textisFinal(仅 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.6BParakeet-EOU 120M
参数600M120M
Encoder24 层 FastConformer,1024 隐藏维17 层 FastConformer,512 隐藏维
Decoder2 层 LSTM,RNN-T1 层 LSTM,RNN-T
EOU 检测外部(VAD 或标点)内置 <EOU> 词元
标点原生内嵌 BPE 词元无(后处理)
语言仅英语25 种欧洲语言
默认分块160 ms320 ms
模型包大小~580 MB~150 MB
何时选择 Nemotron…

当你需要高质量英语转录,带开箱即用的标点和大小写,并且愿意自行分段话语(通过 VAD 或标点提示)时。对于需要内置 EOU 信号的受限 iOS 听写,Parakeet-EOU 仍然是更小、更简单的选择。