创建模块对象使用的是spk_model="cam++"方式报错了,请大佬们帮忙看看,感谢

未關閉
#2,546 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
python

研究方向

Start in funasr/auto/auto_model.py at the ClusterBackend construction shown in the traceback, then trace where ClusterBackend should be imported or defined. Check the speaker diarization initialization path and reproduce with the provided AutoModel arguments. Done means the model initializes without the NameError; this issue has had no comments for over a year, so confirm the failure still occurs.

由索引模型根據 Issue 內容生成。

描述

question

funasr版本:1.26.0
代码:
model = AutoModel(
model="paraformer-zh",
vad_model="fsmn-vad",
punc_model="ct-punc",
spk_model="cam++",
device="cpu",
quantize=True
)

报错:
Traceback (most recent call last):
File "C:\Users\admin\AppData\Roaming\JetBrains\IntelliJIdea2025.1\plugins\python-ce\helpers\pydev\pydevd.py", line 1570, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Roaming\JetBrains\IntelliJIdea2025.1\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\Work Project\py-opencv\src\py-funasr.py", line 199, in
fsmn_vad()
File "D:\Work Project\py-opencv\src\py-funasr.py", line 15, in fsmn_vad
model = AutoModel(
^^^^^^^^^^
File "D:\WorkSpace\Python\Lib\site-packages\funasr\auto\auto_model.py", line 159, in init
self.cb_model = ClusterBackend(**cb_kwargs).to(kwargs["device"])
^^^^^^^^^^^^^^
NameError: name 'ClusterBackend' is not defined
python-BaseException

主要語言
Python
星號
21.2k
分支
2.2k
平均合併
5 小時 38 分鐘
30 天內合併 PR
116

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

modelscope/FunASR 的其他 Issue

查看 modelscope/FunASR 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。