【发布时间】:2011-01-22 08:13:01
【问题描述】:
我过去一直使用Audiolab 导入声音文件,效果很好。然而:
- 不支持某些格式,比如mp3,因为底层的libsndfile refuses to support them
- 它doesn't work in Python 2.6 under Windows,作者不在修复它
-
In [2]: from scikits import audiolab
--------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Python26\Scripts\<ipython console> in <module>()
C:\Python26\lib\site-packages\scikits\audiolab\__init__.py in <module>()
23 __version__ = _version
24
---> 25 from pysndfile import formatinfo, sndfile
26 from pysndfile import supported_format, supported_endianness, \
27 supported_encoding, PyaudioException, \
C:\Python26\lib\site-packages\scikits\audiolab\pysndfile\__init__.py in <module>()
----> 1 from _sndfile import Sndfile, Format, available_file_formats, available_encodings
2 from compat import formatinfo, sndfile, PyaudioException, PyaudioIOError
3 from compat import supported_format, supported_endianness, supported_encoding
ImportError: DLL load failed: The specified module could not be found.``
所以我想:
- 找出为什么它在 2.6 中不起作用(_sndfile.pyd 有问题?),也许找到一种方法来扩展它以使用不受支持的格式
- 找到 audiolab 的完整替代品
【问题讨论】:
-
这个问题是特定于 windows 上的 python 2.6 的(即你不会在 python 2.5 上看到它)。我还没有找到解决方法
-
我终于在两次飞行之间抽出时间,结果是一个 mingw 错误。我已经发布了一个新的 0.11.0 版本,应该可以解决这个问题。
-
大卫,你在 audiolab 中制作了一个很棒的工具!我经常使用它。谢谢。