#5235 TaskCfgVTT(uuid='8924d90da0', name='D:/pdf压缩/1781573985072.m4a', dirname='D:/pdf压缩', noextname='1781573985072', basename

117.44* Posted at: 1 day ago

语音识别阶段出错[阿里FunASR(本地)(本地内置)] object of type 'NoneType' has no len():Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 632, in funasr_mlt
File "funasr\auto\auto_model.py", line 324, in generate

return self.inference(

File "funasr\auto\auto_model.py", line 381, in inference

res = model.inference(**batch, **kwargs)

File "D:\zruanjian/shipin fanyi/videotrans/codes\model.py", line 559, in inference

if len(hotwords) > 0:

TypeError: object of type 'NoneType' has no len()

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 100, in process_task

File "videotrans\task\trans_create.py", line 322, in recogn

File "videotrans\recognition\__init__.py", line 190, in run

File "videotrans\recognition\_base.py", line 94, in run

File "videotrans\recognition\_funasr.py", line 61, in _exec

File "videotrans\configure\base.py", line 258, in _new_process

videotrans.configure.excepts.VideoTransError: object of type 'NoneType' has no len():Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 632, in funasr_mlt
File "funasr\auto\auto_model.py", line 324, in generate

return self.inference(

File "funasr\auto\auto_model.py", line 381, in inference

res = model.inference(**batch, **kwargs)

File "D:\zruanjian/shipin fanyi/videotrans/codes\model.py", line 559, in inference

if len(hotwords) > 0:

TypeError: object of type 'NoneType' has no len()
TaskCfgVTT(uuid='8924d90da0', name='D:/pdf压缩/1781573985072.m4a', dirname='D:/pdf压缩', noextname='1781573985072', basename='1781573985072.m4a', ext='m4a', target_dir='D:/1781573985072-m4a', cache_folder='D:/zruanjian/shipin fanyi/tmp/5908/8924d90da0', is_cuda=False, source_language='日语', source_language_code='ja', source_sub='D:/1781573985072-m4a/ja.srt', source_wav='D:/zruanjian/shipin fanyi/tmp/5908/8924d90da0/ja.wav', source_wav_output='D:/1781573985072-m4a/ja.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='D:/1781573985072-m4a/zh-cn.srt', target_wav='D:/zruanjian/shipin fanyi/tmp/5908/8924d90da0/target.wav', target_wav_output='D:/1781573985072-m4a/zh-cn.m4a', translate_type=17, tts_type=1, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='ja', recogn_type=3, model_name='paraformer-zh', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=0, subtitle_language=None, app_mode='tiqu', subtitles='', targetdir_mp4='D:/1781573985072-m4a/1781573985072.mp4', novoice_mp4='D:/zruanjian/shipin fanyi/tmp/5908/8924d90da0/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal='D:/zruanjian/shipin fanyi/tmp/5908/8924d90da0/vocal.wav', clear_cache=True, background_music='', subtitle_type=0, only_out_mp4=True, recogn2pass=True, output_srt=2, copysrt_rawvideo=False, loop_backaudio=0, backaudio_volume=0.8)


=
system:Windows-10-10.0.26200-SP0
version:v4.02
frozen:True
language:zh
root_dir:D:/zruanjian/shipin fanyi

1 Replies

语音识别失败有两个原因:

  1. 模型选择错误:你的源语言是日语,但当前使用了中文专用模型 paraformer-zh,该模型无法处理日语。请在语音识别渠道切换为多语言模型,例如 Fun-ASR-MLT-Nano-2512SenseVoiceSmall
  2. 热词参数未初始化:FunASR 内部 hotwords 变量为 None 导致 len() 崩溃。请进入 菜单 -> 工具 -> 高级选项 -> 语音识别参数,将“热词”输入框清空并重新保存(确保其为空字符串而非 None)。

修正后重新执行任务即可。如果问题依旧,请提供 logs/ 目录下最新的日志。

Post Your Reply
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: ko-fi.com/jianchang512

Related resource

Similar issues already exist