我过去一直在使用Audiolab导入音频文件,效果还不错。但是:
- 由于底层库sndfile不支持某些格式(如MP3),因此它不支持这些格式(查询FAQ)
- 它无法在Windows下的Python 2.6中运行,而且作者不在身边修复它
-
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的解决方案