#3431 OSError: cannot load library '/Users/yangyi/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.d

223.104* Posted at: 1 hour ago 👁7

系统错误 (None):None:
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/Users/yangyi/pyvideotrans/.venv/lib/python3.10/site-packages/soundfile.py", line 267, in

_snd = _ffi.dlopen('sndfile')

File "/Users/yangyi/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/yangyi/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/yangyi/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/yangyi/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker

r = call_item.fn(*call_item.args, **call_item.kwargs)

File "/Users/yangyi/pyvideotrans/videotrans/process/tts_fun.py", line 33, in qwen3tts_fun

import soundfile as sf

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

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

File "/Users/yangyi/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/yangyi/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/yangyi/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 829, in _load_backend_lib

raise OSError(msg)

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

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

Traceback (most recent call last):
File "/Users/yangyi/pyvideotrans/videotrans/util/ListenVoice.py", line 16, in run

tts.run(

File "/Users/yangyi/pyvideotrans/videotrans/tts/__init__.py", line 341, in run

QwenttsLocal(**kwargs).run()

File "/Users/yangyi/pyvideotrans/videotrans/tts/_base.py", line 139, in run

self._exec()

File "/Users/yangyi/pyvideotrans/videotrans/tts/_qwenttslocal.py", line 60, in _exec

self._new_process(callback=qwen3tts_fun,title=title,is_cuda=self.is_cuda,kwargs=kwargs)

File "/Users/yangyi/pyvideotrans/videotrans/configure/_base.py", line 286, in _new_process

_rs = future.result()

File "/Users/yangyi/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/concurrent/futures/_base.py", line 458, in result

return self.__get_result()

File "/Users/yangyi/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result

raise self._exception

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


=
system:macOS-26.1-arm64-arm-64bit
version:v3.97
frozen:False
language:zh
root_dir:/Users/yangyi/pyvideotrans
Python: 3.10.19 (main, Nov 19 2025, 22:41:43) [Clang 21.1.4 ]

3 Replies

这是由于 macOS 系统缺少 libsndfile 音频库文件,导致 Qwen-TTS (本地) 配音渠道无法加载 soundfile 模块。

  1. 打开终端。
  2. 使用 Homebrew 包管理器安装 libsndfile。在终端中输入以下命令并按回车执行:

    brew install libsndfile
  3. 安装完成后,重新启动 pyVideoTrans 软件,再次尝试使用 Qwen-TTS (本地) 进行配音。

请查阅相关文档:

Qwen3-TTS 本地报错

这是由于 macOS 系统缺少 libsndfile 音频库文件,导致 Qwen-TTS (本地) 配音渠道无法加载 soundfile 模块。

  1. 打开终端。
  2. 使用 Homebrew 包管理器安装 libsndfile。在终端中输入以下命令并按回车执行:brew install libsndfile
  3. 安装完成后,重新启动 pyVideoTrans 软件,再次尝试使用 Qwen-TTS (本地) 进行配音。

请查阅相关文档:

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