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

オープン
#2,546 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
116

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelscope/FunASR のほかの issue

modelscope/FunASR の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。