Replies: 1 comment
|
更正之前的回复:FunASR 当前主分支已经有
如果当前需求可以先接受离线识别 + 热词,使用 Paraformer: from funasr import AutoModel
model = AutoModel(
model="paraformer-zh",
device="npu:0",
disable_update=True,
)
result = model.generate(
input="audio.wav",
hotword="达摩院 魔搭", # singular: hotword
)
print(result[0]["text"])NPU 检测从 FunASR python -c "import torch, torch_npu; print(torch.__version__, torch_npu.__version__, torch_npu.npu.is_available())"如果必须同时满足实时 + 热词,当前有两个诚实的选择:
当前源码依据:
所以问题的直接答案是:现在有 NPU 离线热词模型,也有非 NPU 的实时热词 runtime,但暂时没有经过验证的一体化 910B 实时热词模型。 |
0 replies
Answer selected by
LauraGPT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
更正之前的回复:FunASR 当前主分支已经有
torch_npu设备检测和 NPU 路径;此前“没有 NPU 后端”的说法已经过时。但截至 main1d8080af,还没有一套经过官方端到端验证的“Ascend 910B + 实时识别 + 解码热词”组合,需要把几条不同路径分开看。paraformer-zh(离线)hotword示例paraformer-zh-streaming(Python 分块)device="npu:*"会进入 NPU,但没有公开的 910B 实时复测inference()不读取hotword/hotwordstorch_npu/910B 路径2pass-offline纠错如果…