#5687 System Error (None): NoneTraceback (most recent call last): File "/Users/garikceremnyh/pyvideotrans/.venv/lib/python3.1

95.81* Posted at: 5 hours ago

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

_snd = _ffi.dlopen('sndfile')

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

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

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

backendlib = _load_backend_lib(backend, libname, flags)

File "/Users/garikceremnyh/pyvideotrans/.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/garikceremnyh/pyvideotrans/videotrans/task/only_one.py", line 46, in run

trk.recogn()

File "/Users/garikceremnyh/pyvideotrans/videotrans/task/_stage_recogn.py", line 62, in recogn

raw_subtitles = run_recogn(

File "/Users/garikceremnyh/pyvideotrans/videotrans/recognition/__init__.py", line 197, in run

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

File "/Users/garikceremnyh/pyvideotrans/videotrans/__init__.py", line 28, in get_class

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

File "/Users/garikceremnyh/.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/garikceremnyh/pyvideotrans/videotrans/recognition/_whisper.py", line 13, in

from videotrans.process import openai_whisper, faster_whisper

File "/Users/garikceremnyh/pyvideotrans/videotrans/process/__init__.py", line 2, in

from .tts_fun import qwen3tts_fun

File "/Users/garikceremnyh/pyvideotrans/videotrans/process/tts_fun.py", line 9, in

import soundfile as sf

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

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

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

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

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

backendlib = _load_backend_lib(backend, libname, flags)

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

raise OSError(msg)

OSError: cannot load library '/Users/garikceremnyh/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Users/garikceremnyh/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib, 0x0002): tried: '/Users/garikceremnyh/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/garikceremnyh/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/Users/garikceremnyh/pyvideotrans/.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/garikceremnyh/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib'

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: /Users/garikceremnyh/Downloads/Установка Kali Linux 2026.2 на VMware Fusion.mp4,
输出结果保存到文件夹: /Users/garikceremnyh/Desktop/Установка Kali Linux 2026.2 на VMware Fusion-mp4,
临时文件夹: /Users/garikceremnyh/pyvideotrans/tmp/98294/a1685830d4
已选 清理已存在
未选 启用CUDA加速
未选 降噪
ASR Channel:faster-whisper(LocalBuilt-in), model_name: tiny, 发音语言: Russian, 断句方式:默认断句
Trans Channel:Google (Free),原始语言:Russian,目标语言:English, 已选 Send SRT
Dubb Channel:Qwen3-TTS(LocalBuilt-in), 角色:Vivian, 配音语言:English, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: Embed Hard Subs
已选 仅输出mp4
代理地址:


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

3 Replies

The error is caused by the missing libsndfile system library, which soundfile (Python binding) requires for audio file I/O. This is a known prerequisite on macOS when deploying from source.

Solution:
Install libsndfile via Homebrew:

brew install libsndfile

After installation, restart pyVideoTrans. The library should now be found automatically.

Note: If you also plan to use Rubber Band audio acceleration, you may want to install it as well: brew install rubberband and uv add pyrubberband.

No further configuration is needed—the system library will be linked automatically.

libsndfile стоит

libsndfile 系统库的确已安装,但 Python 的 soundfile 模块仍无法加载它,常见原因是动态库路径未正确关联。请按以下步骤修复:

  1. 确认 Homebrew 安装路径:

    brew --prefix libsndfile

    默认输出 /opt/homebrew/opt/libsndfile(Apple Silicon)或 /usr/local/opt/libsndfile(Intel)。

  2. 卸载并重新安装 soundfile 模块,使其重新编译并找到系统库:

    uv pip uninstall soundfile
    uv pip install soundfile --no-binary soundfile

    --no-binary 强制从源码编译,正确链接 Homebrew 的 libsndfile)

  3. 如果仍失败,手动设置环境变量后重试:

    export DYLD_LIBRARY_PATH=$(brew --prefix libsndfile)/lib:$DYLD_LIBRARY_PATH
    uv run sp.py
  4. 若使用 conda,可尝试通过 conda 安装兼容版本:

    conda install -c conda-forge libsndfile

完成上述步骤后重启软件即可。

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