Nemotron-Speech-Streaming-En-0.6b 是 Nemotron Speech 系列中的首款统一模型,旨在为低延迟流式传输和高吞吐量批量工作负载提供高质量的英语转录服务。该模型原生支持标点符号和大小写转换,并提供具有可配置块大小的运行时灵活性,包括 80ms、160ms、560ms 和 1120ms。
为何选择 nvidia/nemotron-speech-streaming-en-0.6b?
该模型由一个具有缓存感知的流式 🦜 Parakeet(FastConformer)编码器和一个 RNN-T 解码器组成。它专为低延迟至关重要的实时语音转文本应用而设计,例如语音助手、实时字幕和对话式 AI 系统。与传统的“缓冲式”流处理不同,缓存感知架构通过仅处理新的音频块同时重用缓存的编码器上下文来实现连续转录。这显著提高了计算效率,并在不牺牲准确性的情况下最大限度地减少了端到端延迟。
🗣️ 在此处体验 Nemotron-Speech-Streaming-En-0.6b 的实际效果:https://huggingface.co/spaces/nvidia/nemotron-speech-streaming-en-0.6b
此模型已准备好用于商业/非商业用途。
如需文档、部署指南、企业级 API 以及最新的开源模型(包括 Nemotron 和其他前沿的语音、翻译及生成式 AI 模型),请访问 NVIDIA 开发者门户:developer.nvidia.com。
加入社区,获取工具、支持和资源,加速您使用 NVIDIA NeMo、Riva、NIM 和基础模型的开发进程。
什么是 Nemotron?
NVIDIA 开发者 Nemotron
NVIDIA Riva Speech
NeMo 文档
架构类型: FastConformer-CacheAware-RNNT
该模型基于 Cache-Aware [1] FastConformer [2] 架构,包含 24 个编码器层和一个 RNNT(循环神经网络 transducer)解码器。缓存感知流式设计能够高效地分块处理音频,同时保留来自先前帧的上下文。与缓冲推理不同,该模型为所有编码器自注意力层和卷积层维护缓存。这使得在每个流式步骤中都能重用隐藏状态,缓存的激活值消除了冗余计算。因此,不存在重叠计算;每个处理的帧都是严格非重叠的。
连续块的自注意力层和卷积层的缓存方案如下。更多详情,请参考 [1]。
网络架构:
要使用此模型进行训练、微调或推理,您需要安装 NVIDIA NeMo[4]。我们建议您在安装 Cython 和最新版本的 PyTorch 之后再安装它。
apt-get update && apt-get install -y libsndfile1 ffmpeg
pip install Cython packaging
pip install git+https://github.com/NVIDIA/NeMo.git@main#egg=nemo_toolkit[asr]该模型可在 NeMo Framework 中使用,可用作预训练检查点进行推理,或在其他数据集上进行微调。
import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.ASRModel.from_pretrained(model_name="nvidia/nemotron-speech-streaming-en-0.6b")您可以使用 NeMo 提供的缓存感知流式推理脚本 - NeMo/examples/asr/asr_cache_aware_streaming/speech_to_text_cache_aware_streaming_infer.py
cd NeMo
python examples/asr/asr_cache_aware_streaming/speech_to_text_cache_aware_streaming_infer.py \
model_path=<model_path> \
dataset_manifest=<dataset_manifest> \
batch_size=<batch_size> \
att_context_size="[70,13]" \ #set the second value to the desired right context from {0,1,6,13}
output_path=<output_folder> 您也可以通过 pipeline 方法运行流式推理,该方法使用 NeMo/examples/asr/conf/asr_streaming_inference/cache_aware_rnnt.yaml 配置文件构建端到端工作流,支持标点和大小写(PnC)、逆文本规范化(ITN)以及翻译功能。
from nemo.collections.asr.inference.factory.pipeline_builder import PipelineBuilder
from omegaconf import OmegaConf
# Path to the cache aware config file downloaded from above link
cfg_path = 'cache_aware_rnnt.yaml'
cfg = OmegaConf.load(cfg_path)
# Pass the paths of all the audio files for inferencing
audios = ['/path/to/your/audio.wav']
# Create the pipeline object and run inference
pipeline = PipelineBuilder.build_pipeline(cfg)
output = pipeline.run(audios)
# Print the output
for entry in output:
print(entry['text'])该模型已在 Huawei Ascend 910 NPU 上完成适配与验证:
| 项目 | 状态 |
|---|---|
| ✅ NPU 推理 | 已通过 torch_npu 验证 |
| ✅ 精度(误差 < 1%) | CPU-NPU 一致性:100% |
| ✅ 性能 | RTF:0.01(NPU)对比 1.80(CPU),提速最高达 48 倍 |
📖 中文调优指南:README_zh.md
NPU 推理:
import nemo.collections.asr as nemo_asr
model = nemo_asr.models.EncDecRNNTBPEModel.restore_from("nemotron-speech-streaming-en-0.6b.nemo", map_location="cpu")
model = model.to("npu:0")
result = model.transcribe(["audio.wav"])[0]
print(result.text)延迟由 att_context_size 参数定义,其中 att_context_size = {num_frames_left_context, num_frame_right_context},均以80毫秒帧为单位:
此处,块大小 = 当前帧 + 右侧上下文;每个块以非重叠方式处理。
该模型接受采样率为16,000 Hz的单声道音频。音频持续时间至少需要80毫秒。
模型输出带有标点和大小写的英文文本转录。如果输入音频不包含任何语音,输出文本可能为空。
大部分训练数据来自Granary数据集[3]的英文部分:
此外,还使用了以下数据集:
数据模态: 音频和文本
音频训练数据量: 285k小时
数据收集方法: 人工 - 所有音频均为人工录制
标注方法: 混合(人工、合成)- 部分转录文本由ASR模型生成,部分为人工标注
模型在HuggingFace ASR排行榜数据集上进行了评估:
ASR性能使用词错误率(WER)衡量。真实文本和预测文本均使用whisper-normalizer 0.1.12版本进行处理。
以下表格显示了在HuggingFace OpenASR排行榜数据集上的WER:
| 平均值 | AMI | Earnings22 | Gigaspeech | LS-test-clean | LS-test-other | SPGI | TEDLIUM | VoxPopuli | |
|---|---|---|---|---|---|---|---|---|---|
| WER(%) | 7.16 | 11.58 | 12.48 | 11.45 | 2.31 | 4.75 | 2.62 | 4.50 | 7.57 |
| 平均值 | AMI | Earnings22 | Gigaspeech | LS-test-clean | LS-test-other | SPGI | TEDLIUM | VoxPopuli | |
|---|---|---|---|---|---|---|---|---|---|
| WER(%) | 7.22 | 11.69 | 12.61 | 11.43 | 2.40 | 4.97 | 2.64 | 4.46 | 7.59 |
| 平均值 | AMI | Earnings22 | Gigaspeech | LS-test-clean | LS-test-other | SPGI | TEDLIUM | VoxPopuli | |
|---|---|---|---|---|---|---|---|---|---|
| WER(%) | 7.84 | 13.88 | 13.61 | 12.12 | 2.43 | 5.33 | 2.82 | 4.80 | 7.72 |
| 平均值 | AMI | Earnings22 | Gigaspeech | LS-test-clean | LS-test-other | SPGI | TEDLIUM | VoxPopuli | |
|---|---|---|---|---|---|---|---|---|---|
| WER(%) | 8.528 | 16.05 | 14.6 | 12.92 | 2.55 | 5.79 | 3.01 | 5.07 | 8.23 |
运行时引擎: NeMo 25.11
支持的硬件微架构兼容性:
测试硬件:
首选/支持的操作系统: Linux
NVIDIA 认为可信 AI 是一项共同的责任,我们已制定相关政策和实践,以支持各类 AI 应用的开发。当开发者按照我们的服务条款下载或使用本模型时,应与内部模型团队合作,确保该模型满足相关行业和用例的要求,并应对未预见的产品误用问题。
如发现模型质量、风险、安全漏洞或 NVIDIA AI 相关问题,请通过此处报告。
[1] Stateful Conformer with Cache-based Inference for Streaming Automatic Speech Recognition
[2] Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition
[3] NVIDIA Granary