#5699 System Error (None): NoneTraceback (most recent call last): File "/Users/username/pyvideotrans_404/.venv/lib/python3.10

108.160* Posted at: 1 hour ago

System Error (None): None
Traceback (most recent call last):
File "/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/soundfile.py", line 267, in

_snd = _ffi.dlopen('sndfile')

File "/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen

lib, function_cache = _make_ffi_library(self, name, flags)

File "/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/cffi/api.py", line 834, in _make_ffi_library

backendlib = _load_backend_lib(backend, libname, flags)

File "/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/cffi/api.py", line 829, in _load_backend_lib

raise OSError(msg)

OSError: ctypes.util.find_library() did not manage to locate a library called 'sndfile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/username/pyvideotrans_404/videotrans/task/only_one.py", line 46, in run

trk.recogn()

File "/Users/username/pyvideotrans_404/videotrans/task/_stage_recogn.py", line 62, in recogn

raw_subtitles = run_recogn(

File "/Users/username/pyvideotrans_404/videotrans/recognition/__init__.py", line 197, in run

_cls: Union[Type[BaseRecogn], None] = get_class(recogn_type, "recognition", _ID_NAME_DICT)

File "/Users/username/pyvideotrans_404/videotrans/__init__.py", line 28, in get_class

module = importlib.import_module(f'videotrans.{provider_type}{_module_map.imp}', __name__)

File "/Users/username/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/importlib/__init__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/username/pyvideotrans_404/videotrans/recognition/_qwenasrlocal.py", line 14, in

from videotrans.process import qwen3asr_fun

File "/Users/username/pyvideotrans_404/videotrans/process/__init__.py", line 2, in

from .tts_fun import qwen3tts_fun

File "/Users/username/pyvideotrans_404/videotrans/process/tts_fun.py", line 9, in

import soundfile as sf

File "/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/soundfile.py", line 276, in

_snd = _ffi.dlopen(_os.path.join(

File "/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen

lib, function_cache = _make_ffi_library(self, name, flags)

File "/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/cffi/api.py", line 834, in _make_ffi_library

backendlib = _load_backend_lib(backend, libname, flags)

File "/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/cffi/api.py", line 829, in _load_backend_lib

raise OSError(msg)

OSError: cannot load library '/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib, 0x0002): tried: '/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file). Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib'

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: /Users/username/Movies/CapCut/11-sample/processed/orig08.mp4,
输出结果保存到文件夹: /Users/username/Movies/CapCut/11-sample/processed/_video_out/orig08-mp4,
临时文件夹: /Users/username/pyvideotrans_404/tmp/4259/41d1084a6d
未选 清理已存在
未选 启用CUDA加速
未选 降噪
已选 识别说话人,最大说话人数量不限制
已选 恢复标点符号
ASR Channel:Qwen-ASR(LocalBuilt-in), model_name: 1.7B, 发音语言: Simplified Chinese, 断句方式:默认断句
Trans Channel:Google (Free),原始语言:Simplified Chinese,目标语言:English, 已选 Send SRT
Dubb Channel:F5-TTS(LocalBuilt-in), 角色:clone, 配音语言:English, 已选 二次语音识别
音量:+0%, 语速:+10%, 已选 音频加速, 已选 视频慢速
字幕: No Subs
代理地址:


=
system:macOS-15.7.4-arm64-arm-64bit
version:v4.04
frozen:False
language:en
root_dir:/Users/username/pyvideotrans_404
Python: 3.10.19 (main, Feb 12 2026, 00:36:33) [Clang 21.1.4 ]

3 Replies

This error is caused by the missing libsndfile system library on your macOS, which is required by the soundfile Python package for audio I/O.

To fix it:

  1. Install libsndfile via Homebrew:

    brew install libsndfile
  2. Re-sync your Python dependencies to ensure everything is linked properly:

    uv sync
  3. Restart pyVideoTrans.

If the problem persists after installation, also ensure libsndfile is correctly linked by running:

brew reinstall libsndfile

See also:

I still get the same error after doing reinstall (brew reinstall libsndfile)

错误是由于 Python 的 soundfile 库在 macOS 上无法找到系统安装的 libsndfile 动态库,即使 brew 已安装。接下来请按顺序执行:

  1. 确认 libsndfile 的安装路径并设置环境变量
    在终端执行:

    export DYLD_LIBRARY_PATH=$(brew --prefix libsndfile)/lib:$DYLD_LIBRARY_PATH

    然后在同一个终端中启动 pyVideoTrans:uv run sp.py

  2. 如果仍报错,强制重新编译 soundfile
    在项目根目录下运行:

    uv pip install soundfile --no-binary :all: --force-reinstall

    这会从源码编译,自动链接 brew 安装的 libsndfile

  3. (可选)手动拷贝动态库
    如果上述方法无效,可手动建立符号链接:

    ln -s $(brew --prefix libsndfile)/lib/libsndfile.1.dylib /Users/username/pyvideotrans_404/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib

完成任意一步后重启软件即可。

请查阅相关文档:

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