#9087 语音识别阶段出错[阿里FunASR(内置)] FunASRPipeline: GenericFunASR: Not found:

183.2**2 Posted at: 2 hours ago

语音识别阶段出错[阿里FunASR(内置)] FunASRPipeline: GenericFunASR: Not found: "E:/转文字/models/SenseVoiceSmall\chn_jpn_yue_eng_ko_spectok.bpe.model": Illegal byte sequence Error #42:Traceback (most recent call last):
File "modelscope\utils\registry.py", line 209, in build_from_cfg

return obj_cls._instantiate(**args)

File "modelscope\models\base\base_model.py", line 85, in _instantiate

return cls(**kwargs)

File "E:\转文字\_internal\modelscope\models\audio\funasr\model.py", line 55, in init

self.model = AutoModel(model=model_dir, **kwargs)

File "funasr\auto\auto_model.py", line 135, in init

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

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

tokenizer = tokenizer_class(**tokenizer_conf)

File "E:\转文字\_internal\funasr\tokenizer\sentencepiece_tokenizer.py", line 23, in init

self._build_sentence_piece_processor()

File "E:\转文字\_internal\funasr\tokenizer\sentencepiece_tokenizer.py", line 32, in _build_sentence_piece_processor

self.sp.load(self.bpemodel)

File "sentencepiece\__init__.py", line 961, in Load
File "sentencepiece\__init__.py", line 316, in LoadFromFile
OSError: Not found: "E:/转文字/models/SenseVoiceSmall\chn_jpn_yue_eng_ko_spectok.bpe.model": Illegal byte sequence Error #42

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "modelscope\utils\registry.py", line 211, in build_from_cfg

return obj_cls(*

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

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

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

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

videotrans.configure.excepts.VideoTransError: FunASRPipeline: GenericFunASR: Not found: "E:/转文字/models/SenseVoiceSmall\chn_jpn_yue_eng_ko_spectok.bpe.model": Illegal byte sequence Error #42:Traceback (most recent call last):
File "modelscope\utils\registry.py", line 209, in build_from_cfg

return obj_cls._instantiate(**args)

File "modelscope\models\base\base_model.py", line 85, in _instantiate

return cls(**kwargs)

File "E:\转文字\_internal\modelscope\models\audio\funasr\model.py", line 55, in init

self.model = AutoModel(model=model_dir, **kwargs)

File "funasr\auto\auto_model.py", line 135, in init

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

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

tokenizer = tokenizer_class(**tokenizer_conf)

File "E:\转文字\_internal\funasr\tokenizer\sentencepiece_tokenizer.py", line 23, in init

self._build_sentence_piece_processor()

File "E:\转文字\_internal\funasr\tokenizer\sentencepiece_tokenizer.py", line 32, in _build_sentence_piece_processor

self.sp.load(self.bpemodel)

File "sentencepiece\__init__.py", line 961, in Load
File "sentencepiece\__init__.py", line 316, in LoadFromFile
OSError: Not found: "E:/转文字/models/SenseVoiceSmall\chn_jpn_yue_eng_ko_spectok.bpe.model": Illegal byte sequence Error #42

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "modelscope\utils\registry.py", line 211, in build_from_cfg

return obj_cls(**args)

File "E:\转文字\_internal\modelscope\pipelines\audio\funasr_pipeline.py", line 62, in init

super().__init__(model=model, **kwargs)

File "modelscope\pipelines\base.py", line 104, in init

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

File "modelscope\pipelines\base.py", line 56, in initiate_single_model

return Model.from_pretrained(

File "modelscope\models\base\base_model.py", line 217, in from_pretrained

model = build_model(

File "modelscope\models\builder.py", line 35, in build_model

model = build_from_cfg(

File "modelscope\utils\registry.py", line 214, in build_from_cfg

raise type(e)(f'{obj_cls.__name__}: {e}') from e

OSError: GenericFunASR: Not found: "E:/转文字/models/SenseVoiceSmall\chn_jpn_yue_eng_ko_spectok.bpe.model": Illegal byte sequence Error #42

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\process\stt_funasr.py", line 36, in funasr_mlt
File "modelscope\pipelines\builder.py", line 229, in pipeline

return build_pipeline(cfg, task_name=task)

File "modelscope\pipelines\builder.py", line 69, in build_pipeline

return build_from_cfg(

File "modelscope\utils\registry.py", line 214, in build_from_cfg

raise type(e)(f'{obj_cls.__name__}: {e}') from e

OSError: FunASRPipeline: GenericFunASR: Not found: "E:/转文字/models/SenseVoiceSmall\chn_jpn_yue_eng_ko_spectok.bpe.model": Illegal byte sequence Error #42
trk=语音转录
self.cfg.name='E:/视频号下载2/家庭幸福的真相千万别_20261204150805.mp4',
self.cfg.target_dir='E:/视频号下载2',
self.cfg.cache_folder='E:/转文字/tmp/48316/9eaf35f73a'
self.cfg.is_cuda=True
语音识别:阿里FunASR(内置), SenseVoiceSmall, 发音语言: zh
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
输出格式: txt
中日韩字幕单行字符数:15, 其他语言字幕单行字符数:40
self.cfg=TaskCfgSTT(uuid='9eaf35f73a', name='E:/视频号下载2/家庭幸福的真相千万别_20261204150805.mp4', dirname='E:/视频号下载2', noextname='家庭幸福的真相千万别_20261204150805', basename='家庭幸福的真相千万别_20261204150805.mp4', ext='mp4', target_dir='E:/视频号下载2', cache_folder='E:/转文字/tmp/48316/9eaf35f73a', is_cuda=True, source_language='', source_language_code='', source_sub=None, source_wav=None, source_wav_output=None, target_language='', target_language_code='', target_sub='E:/视频号下载2/家庭幸福的真相千万别_20261204150805.srt', target_wav=None, target_wav_output=None, detect_language='zh', recogn_type=4, model_name='SenseVoiceSmall', shibie_audio='E:/转文字/tmp/48316/9eaf35f73a/家庭幸福的真相千万别_20261204150805-1796370195.7880697.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0)


=
system:Windows-10-10.0.26200-SP0
version:v4.20
frozen:True
language:zh_CN
root_dir:E:/转文字

1 Replies

#1 DeepSeek reply at 2 hours ago

核心原因:这不是模型文件真的丢失,而是路径含中文导致 sentencepiece 在 Windows 下无法打开模型文件(错误码 #42 即“非法字节序列/EILSEQ”),报错文案才会伪装成 Not found。你的软件安装在 E:\转文字,模型路径 E:/转文字/models/SenseVoiceSmall 中含中文,FunASR 会调用 sentencepiece 读取 .bpe.model,而该库对非 ASCII 路径兼容性极差。

处理步骤

  1. 关闭软件,把整个程序目录从 E:\转文字 移动到纯英文、无空格、无中文的浅层路径,例如 D:\pyVideoTrans,再双击 sp.exe 启动。
  2. 迁移后进入新目录下的 models\SenseVoiceSmall,确认存在 chn_jpn_yue_eng_ko_spectok.bpe.model、model.pt 等文件;若缺失或不完整,删除整个 SenseVoiceSmall 文件夹后重新执行识别,让它自动重新下载(也可手动从 modelscope 的 iic/SenseVoiceSmall 拉取全部文件放入该目录)。
  3. 建议同时处理视频侧:当前待识别文件为 E:/视频号下载2/家庭幸福的真相千万别_20261204150805.mp4,目录和文件名均含中文长串,请复制到英文目录(如 D:\videos\v1.mp4)后重新导入。这样可避免 FFmpeg 和后续模型的连带报错。
  4. 若移动路径后仍报同样错误,可暂改用 faster-whisper(内置) + large-v3-turbo 先完成转录(该渠道对中文路径容忍度更好),再排查 FunASR。
补充:models\SenseVoiceSmall 若所在盘符路径总长度过深,Windows 命令行 260 字符限制也可能触发类似异常,请尽量保持路径简短。

请查阅相关文档:

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