#8755 语音识别阶段出错[阿里FunASR(内置)] FunASRNano is not registered:Traceback (most recent call last): File

15.235**8 Posted at: 3 hours ago

语音识别阶段出错[阿里FunASR(内置)] FunASRNano is not registered:Traceback (most recent call last):
File "videotrans\process\stt_funasr.py", line 51, in funasr_mlt
File "funasr\auto\auto_model.py", line 135, in init

model, kwargs = self.build_model(**kwargs)

File "funasr\auto\auto_model.py", line 281, in build_model

assert model_class is not None, f'{kwargs["model"]} is not registered'

AssertionError: FunASRNano is not registered

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 84, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 148, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_funasr.py", line 70, in _exec
File "videotrans\configure\base.py", line 291, in _new_process
videotrans.configure.excepts.VideoTransError: FunASRNano is not registered:Traceback (most recent call last):
File "videotrans\process\stt_funasr.py", line 51, in funasr_mlt
File "funasr\auto\auto_model.py", line 135, in init

model, kwargs = self.build_model(**kwargs)

File "funasr\auto\auto_model.py", line 281, in build_model

assert model_class is not None, f'{kwargs["model"]} is not registered'

AssertionError: FunASRNano is not registered

trk=翻译视频 单视频模式
选择音视频文件: D:/2026sales_video/Midshine factory/VID_20261110_170420.mp4,
输出目录: D:/2026sales_video/Midshine factory/_video_out/VID_20261110_170420-mp4,
self.cfg.cache_folder='D:/AI/win-pyvideotrans-v4.18/tmp/29656/2d19321c13'
已选 清理已生成, 已选 CUDA加速
语音识别:阿里FunASR(内置), Fun-ASR-Nano-2512, 发音语言: 简体中文
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
翻译渠道:Hy-MT2-7B(内置),发音语言:简体中文,目标语言:越南语
传统翻译渠道每批字幕行数: 5
配音渠道:Piper(内置), 配音角色:vi_VN-male_20s-medium, 目标语言:越南语
Volume:+0%, Speed:+0%, 已选 配音加速, 未选 视频慢速
已选 移除每条字幕配音开头结尾静音缓冲
静音移除力度: default
嵌入软字幕
video duration:32114ms
video information:{'video_fps': 30.0, 'r_frame_rate': 30.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1920, 'height': 1080, 'time': 32114, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='2d19321c13', name='D:/2026sales_video/Midshine factory/VID_20261110_170420.mp4', dirname='D:/2026sales_video/Midshine factory', noextname='VID_20261110_170420', basename='VID_20261110_170420.mp4', ext='mp4', target_dir='D:/2026sales_video/Midshine factory/_video_out/VID_20261110_170420-mp4', cache_folder='D:/AI/win-pyvideotrans-v4.18/tmp/29656/2d19321c13', is_cuda=True, source_language='简体中文', source_language_code='zh-cn', source_sub='D:/2026sales_video/Midshine factory/_video_out/VID_20261110_170420-mp4/zh-cn.srt', source_wav='D:/AI/win-pyvideotrans-v4.18/tmp/29656/2d19321c13/zh-cn.wav', source_wav_output='D:/2026sales_video/Midshine factory/_video_out/VID_20261110_170420-mp4/zh-cn.m4a', target_language='越南语', target_language_code='vi', target_sub='D:/2026sales_video/Midshine factory/_video_out/VID_20261110_170420-mp4/vi.srt', target_wav='D:/AI/win-pyvideotrans-v4.18/tmp/29656/2d19321c13/target.wav', target_wav_output='D:/2026sales_video/Midshine factory/_video_out/VID_20261110_170420-mp4/vi.m4a', translate_type=3, tts_type=8, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='vi_VN-male_20s-medium', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='zh', recogn_type=3, model_name='Fun-ASR-Nano-2512', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='D:/2026sales_video/Midshine factory/_video_out/VID_20261110_170420-mp4/VID_20261110_170420.mp4', novoice_mp4='D:/AI/win-pyvideotrans-v4.18/tmp/29656/2d19321c13/novoice.mp4', is_separate=False, embed_bgm=True, instrument='D:/AI/win-pyvideotrans-v4.18/tmp/29656/2d19321c13/instrument.wav', vocal='D:/AI/win-pyvideotrans-v4.18/tmp/29656/2d19321c13/vocal.wav', clear_cache=True, background_music='', subtitle_type=2, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=32114


=
system:Windows-10-10.0.22631-SP0
version:v4.18
frozen:True
language:zh_CN
root_dir:D:/AI/win-pyvideotrans-v4.18

1 Replies

#1 DeepSeek reply at 3 hours ago

这是内置 funasr 依赖库中不存在 FunASRNano 这一模型类导致的,即“代码/模型名”与“funasr 库版本”不匹配,并非视频文件或 CUDA 的问题。

最可能的原因

  1. 你使用补丁包覆盖升级到 v4.18 时,只替换了 sp.exe,没有同时覆盖 _internal文件夹和 videotrans 文件夹,导致 funasr 库仍是旧版本,无法识别 Fun-ASR-Nano-2512 这个新模型。
  2. 覆盖后残留 __pycache__ 缓存,程序加载的仍是旧字节码。

解决办法(按顺序尝试)

  1. 关闭软件。在旧版本目录的 _internal 文件夹内搜索 __pycache__,删除搜索到的所有 __pycache__ 文件夹。
  2. 重新下载当前 v4.18 的完整补丁包,把包内所有文件和文件夹(sp.exe、_internal、videotrans 等)完整覆盖到软件目录,不要只覆盖 sp.exe。
  3. 若仍报同错,请先改用其他中文识别渠道应急(效果同样较好):

    • Qwen-ASR(内置) + 1.7B
    • Firered中文(内置)
    • faster-whisper(内置) + large-v3
  4. 若你是源码部署(frozen:True 显示你使用的是 Windows 打包版,此项不适用),可执行 uv add -U funasr 升级依赖;打包版用户无法自行升级,只能等官方补丁包。

注意:报错发生在语音识别阶段最开始,后续 Hy-MT2、Piper 等配置尚未执行,因此只需先解决识别渠道问题,其余设置无需改动。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource