将声音文件作为NumPy数组导入Python(audiolab的替代品)

发布于 2021-01-29 17:32:58

过去,我一直使用Audiolab导入声音文件,并且效果很好。然而:

--

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的完整替代品
关注者
0
被浏览
145
1 个回答
  • 面试哥
    面试哥 2021-01-29
    为面试而生,有面试问题,就找面试哥。

    我最近一直在使用PySoundFile而不是Audiolab。使用可以轻松安装conda

    像大多数东西一样,它不支持mp3。MP3不再拥有专利,因此没有理由不支持它。有人只需要将支持写入libsndfile即可



知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看