#3329 TaskCfg(cache_folder='D:/pif/green/win-videotrans-v3.97-LiXianZiMu-ai/tmp/7516/ce3205b571', target_dir='D:/pif/green/win

2409:8a4c* Posted at: 6 hours ago 👁13

语音识别阶段出错 [阿里FunASR(本地)] ModuleNotFoundError: No module named 'pytz.tzinfo'
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "concurrent\futures\process.py", line 243, in _process_worker
File "videotrans\process\stt_fun.py", line 470, in paraformer
File "pyimod02_importers.py", line 457, in exec_module
File "modelscope\pipelines\__init__.py", line 4, in

from .base import Pipeline

File "pyimod02_importers.py", line 457, in exec_module
File "modelscope\pipelines\base.py", line 16, in

from modelscope.msdatasets import MsDataset

File "pyimod02_importers.py", line 457, in exec_module
File "modelscope\msdatasets\__init__.py", line 2, in

from modelscope.msdatasets.ms_dataset import MsDataset

File "pyimod02_importers.py", line 457, in exec_module
File "modelscope\msdatasets\ms_dataset.py", line 9, in

from datasets import (Dataset, DatasetDict, Features, IterableDataset,

File "pyimod02_importers.py", line 457, in exec_module
File "datasets\__init__.py", line 17, in

from .arrow_dataset import Dataset

File "pyimod02_importers.py", line 457, in exec_module
File "datasets\arrow_dataset.py", line 59, in

import pandas as pd

File "D:\pif\green\win-videotrans-v3.97-LiXianZiMu-ai\_internal\pandas\__init__.py", line 61, in

from pandas.core.api import (

File "D:\pif\green\win-videotrans-v3.97-LiXianZiMu-ai\_internal\pandas\core\api.py", line 1, in

from pandas._libs import (

File "D:\pif\green\win-videotrans-v3.97-LiXianZiMu-ai\_internal\pandas\_libs\__init__.py", line 18, in

from pandas._libs.interval import Interval

File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
File "pandas/_libs/hashtable.pyx", line 1, in init pandas._libs.hashtable
File "pandas/_libs/missing.pyx", line 1, in init pandas._libs.missing
File "D:\pif\green\win-videotrans-v3.97-LiXianZiMu-ai\_internal\pandas\_libs\tslibs\__init__.py", line 40, in

from pandas._libs.tslibs.conversion import localize_pydatetime

File "pandas/_libs/tslibs/conversion.pyx", line 1, in init pandas._libs.tslibs.conversion
File "pandas/_libs/tslibs/offsets.pyx", line 1, in init pandas._libs.tslibs.offsets
File "pandas/_libs/tslibs/timestamps.pyx", line 1, in init pandas._libs.tslibs.timestamps
File "pandas/_libs/tslibs/timedeltas.pyx", line 1, in init pandas._libs.tslibs.timedeltas
File "pandas/_libs/tslibs/timezones.pyx", line 32, in init pandas._libs.tslibs.timezones
ModuleNotFoundError: No module named 'pytz.tzinfo'
"""

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

Traceback (most recent call last):
File "videotrans\task\job.py", line 106, in run
File "videotrans\task\_speech2text.py", line 156, in recogn
File "videotrans\recognition\__init__.py", line 245, in run
File "videotrans\recognition\_base.py", line 141, in run
File "videotrans\recognition\_funasr.py", line 71, in _exec
File "videotrans\configure\_base.py", line 287, in _new_process
File "concurrent\futures\_base.py", line 446, in result
File "concurrent\futures\_base.py", line 391, in __get_result
ModuleNotFoundError: No module named 'pytz.tzinfo'
TaskCfg(cache_folder='D:/pif/green/win-videotrans-v3.97-LiXianZiMu-ai/tmp/7516/ce3205b571', target_dir='D:/pif/green/win-videotrans-v3.97-LiXianZiMu-ai/output/recogn', remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code=None, source_sub=None, target_sub='D:/pif/green/win-videotrans-v3.97-LiXianZiMu-ai/output/recogn/50_显卡和显存工作的原理.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles='', novoice_mp4=None, noextname='50_显卡和显存工作的原理', shibie_audio='D:/pif/green/win-videotrans-v3.97-LiXianZiMu-ai/tmp/7516/ce3205b571/50_显卡和显存工作的原理-1771862357.021427.wav', targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=None, recogn_type=3, model_name='paraformer-zh', voice_autorate=False, video_autorate=False, is_cuda=True, name='C:/黑马嵌入式/01阶段:模拟电路,计算机原理/计算机组成原理-13h16min/50_显卡和显存工作的原理.mp4', basename='50_显卡和显存工作的原理.mp4', ext='mp4', dirname='C:/黑马嵌入式/01阶段:模拟电路,计算机原理/计算机组成原理-13h16min', shound_del_name=None, uuid='ce3205b571', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=False, fix_punc=False, recogn2pass=False)


=
system:Windows-10-10.0.17763-SP0
version:v3.97
frozen:True
language:zh
root_dir:D:/pif/green/win-videotrans-v3.97-LiXianZiMu-ai

1 Replies

这是由于软件打包环境中的 pytz 模块版本或依赖不完整导致的。pytzpandasmodelscope 等库的依赖项,用于处理时区信息。在预打包的 Windows 版本中,该模块可能缺失了必要的子模块 tzinfo

解决方案

  1. 临时方案:切换到其他语音识别渠道。

    • 在“语音识别渠道”下拉菜单中,选择其他可用的渠道,例如 faster-whisperopenai-whisper
    • 这是最快速解决问题的方法,可以绕过 pytz 依赖问题。
  2. 根本解决:重新下载完整的软件包。

    • 前往官方下载页面,下载 完整版(而非补丁包)的 .7z 压缩文件。
    • 将现有软件目录(D:\pif\green\win-videotrans-v3.97-LiXianZiMu-ai完全删除
    • 将新下载的完整版解压到一个新的、路径不含中文和空格的目录(例如 D:\pyVideoTrans)。
    • 重新启动软件尝试使用 FunASR

重要提示

  • 请确保您下载的是 完整版,因为补丁包可能不包含修复后的完整依赖库。
  • 您的视频文件路径包含中文(C:/黑马嵌入式/...),这可能导致其他未知问题。建议将视频文件移动到纯英文路径下再进行处理。

请查阅相关文档:

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