我知道以下问题: 如何使用numpy数组创建pydub AudioSegment?
我的问题恰恰相反.如果我有一个pydub AudioSegment如何将其转换为numpy数组?
我想使用scipy过滤器等.我不太清楚AudioSegment原始数据的内部结构是什么.
我过去一直在使用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 …Run Code Online (Sandbox Code Playgroud)