#4258 The above exception was the direct cause of the following exception:Traceback (most recent call last): File "videotrans

2409:8a1e* Posted at: 4 hours ago 👁9

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

Traceback (most recent call last):
File "videotrans\task\trans_create.py", line 944, in _split_audio_byraw
File "videotrans\configure\_base.py", line 285, in _new_process
File "concurrent\futures\_base.py", line 458, in result
File "concurrent\futures\_base.py", line 403, in __get_result
ImportError: cannot import name 'OfflineFireRedAsrCtcModelConfig' from 'sherpa_onnx.lib._sherpa_onnx' (G:\pyVideoTrans\_internal\sherpa_onnx\lib\_sherpa_onnx.cp310-win_amd64.pyd)
[ERROR] 人声背景声分离失败:cannot import name 'OfflineFireRedAsrCtcModelConfig' from 'sherpa_onnx.lib._sherpa_onnx' (G:\pyVideoTrans\_internal\sherpa_onnx\lib\_sherpa_onnx.cp310-win_amd64.pyd)
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "concurrent\futures\process.py", line 246, in _process_worker
File "videotrans\process\prepare_audio.py", line 33, in vocal_bgm
File "pyimod02_importers.py", line 457, in exec_module
File "sherpa_onnx\__init__.py", line 85, in

from .offline_recognizer import OfflineRecognizer

File "pyimod02_importers.py", line 457, in exec_module
File "sherpa_onnx\offline_recognizer.py", line 6, in

from sherpa_onnx.lib._sherpa_onnx import (

ImportError: cannot import name 'OfflineFireRedAsrCtcModelConfig' from 'sherpa_onnx.lib._sherpa_onnx' (G:\pyVideoTrans\_internal\sherpa_onnx\lib\_sherpa_onnx.cp310-win_amd64.pyd)
"""

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

Traceback (most recent call last):
File "videotrans\task\trans_create.py", line 944, in _split_audio_byraw
File "videotrans\configure\_base.py", line 285, in _new_process
File "concurrent\futures\_base.py", line 458, in result
File "concurrent\futures\_base.py", line 403, in __get_result
ImportError: cannot import name 'OfflineFireRedAsrCtcModelConfig' from 'sherpa_onnx.lib._sherpa_onnx' (G:\pyVideoTrans\_internal\sherpa_onnx\lib\_sherpa_onnx.cp310-win_amd64.pyd)

[DEBUG] [recognition]__init__:kwargs={'detect_language': 'en', 'audio_file': 'G:/pyVideoTrans/tmp/7680/8ec55691f2/en.wav', 'cache_folder': 'G:/pyVideoTrans/tmp/7680/8ec55691f2', 'model_name': 'medium', 'uuid': '8ec55691f2', 'is_cuda': True, 'subtitle_type': 1, 'recogn_type': 0, 'max_speakers': -1, 'llm_post': False, 'recogn2pass': False}
[DEBUG] BaseRecogn 初始化

[DEBUG] GPU进程池:max_workers=1
[DEBUG] faster-whisper模式下,对medium模型返回的断句结果重新修正
[DEBUG] [语音识别]渠道0,medium:共耗时:12s
self.trans_thread=20,self.aisendsrt=False,self.translate_type=1
[INFO] Starting call to 'videotrans.translator._microsoft.Microsoft._item_task', this is the 1st time calling it.
[DEBUG] [Mircosoft]返回:response=
[DEBUG] 以普通文本行按行翻译:原始行数:17,翻译后行数:17
[DEBUG] [字幕翻译]渠道1,:共耗时:2s
[DEBUG] 本次EdgeTTS配音:重试延迟:5,出错将重试:4,并发:10
[DEBUG] 执行流程:所有配音任务结束。
[DEBUG] 开始执行事件循环的关闭流程...
[DEBUG] 事件循环已关闭。
[DEBUG] [字幕配音]渠道0:共耗时:27s

1 Replies

这是由于 sherpa_onnx 库版本不匹配或文件损坏导致的,通常发生在覆盖升级补丁包后或使用了不完整的完整包。

解决方案

  1. 重新下载完整包并覆盖:前往 下载页面 下载最新的完整软件包(非补丁包),解压后覆盖到现有目录(或解压到新路径),确保 _internal/sherpa_onnx/ 目录是完整的。
  2. 更改分离背景声模型:若问题依旧,打开软件 → 菜单栏 工具/选项高级选项 → 找到 分离背景声模型,切换为其他模型(如 demucsmdxnet),然后重试任务。
  3. 检查文件路径:确保软件路径不含中文、空格或过长字符(当前路径 G:\pyVideoTrans 符合要求)。
  4. 更新到 v3.99:如果当前版本低于 v3.99,建议先升级到最新版(v3.99 修复了多个兼容性问题)。

若仍无法解决,请提供 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.

Related resource

Similar issues already exist