Python package for signal processing
Asked Answered
M

3

9

I am looking for a Python package to perform an efficient Constant Q Transform (ie using an FFT to speed up the process). I found a toolbox named CQ-NSGT/sliCQ Toolbox, but I get the following error:

File "build\bdist.win32\egg\nsgt\__init__.py", line 37, in <module>
File "build\bdist.win32\egg\nsgt\audio.py", line 7, in <module>
File "C:\Python27\lib\site-packages\scikits\audiolab\__init__.py", line 25, in <module>
    from pysndfile import formatinfo, sndfile
File "C:\Python27\lib\site-packages\scikits\audiolab\pysndfile\__init__.py", line 1, in <module>
    from _sndfile import Sndfile, Format, available_file_formats, \
File "numpy.pxd", line 30, in scikits.audiolab.pysndfile._sndfile (scikits\audiolab\pysndfile\_sndfile.c:9632)
ValueError: numpy.dtype does not appear to be the correct type object

There seems to be a problem either with Numpy (which I doubt) or more likely with scikit audiolab. Do you know where the problem comes from?

Merissa answered 11/4, 2013 at 15:6 Comment(7)
Is this error while you are trying to build the package? If so I can confirm that it builds and installs fine on XP with Python 2.7Goss
The error occurs when I try the command 'import nsgt' or 'from nsgt import *'...Merissa
How did you install audiolab? I don't have any problems here: i.imgur.com/gems9V6.pngGoss
I used this one: lfd.uci.edu/~gohlke/pythonlibs/#scikits.audiolabMerissa
Christoph's packages are God given, but not all are 100% portable across systems. I'd suggest you build stable libsndfile with MinGW and then build audiolab (from pypi).Goss
Additionally, as audolab is used just for reading data, maybe you can tweak nsgt source, to read just wav with scipy.io or similar, but I have no idea if this is more then trivialGoss
I'd check out compatibility of the versions of numpy, python and your library - I had similar messages when using obsolete numpy. For my audio tasks I just used FFT right from numpy and, but I had a very basic task.Unshakable
W
1

I use the CQT tools in yaafe: http://perso.telecom-paristech.fr/~essid/tp-yaafe-extension/features.html

Wickman answered 22/7, 2013 at 20:16 Comment(0)
H
0

Check out PYO, a C-implemented DSP module for python. Has mathematical operations on signals, should include Fourier transforms.

http://code.google.com/p/pyo/

Honest answered 8/5, 2013 at 19:52 Comment(0)
C
0

PyMIR has implementations of some audio and music processing routines, such as applying the FFT from NumPy to wav or mp3 data, or applying the CQT (Constant Q transform) or DCT (Discrete Cosine Transform, built using NumPy) to the same kind of audio data:

PyMIR is MIT licensed.

Carder answered 9/10, 2015 at 1:32 Comment(1)
I just saw the cqt implementation in PyMIT, and it is really not optimised (github.com/jsawruk/pymir/blob/master/pymir/Transforms.py#L56)Brede

© 2022 - 2024 — McMap. All rights reserved.