Giter VIP home page Giter VIP logo

audiolab's People

Contributors

cournape avatar endolith avatar rutsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

audiolab's Issues

audiolab.play : handling the data array the "wrong" way?

Hi David,

Just ran into that error, under MacOs 10.6 (Snow Leopard): I have some data array for a stereo audio file, with sampling rate 44.1kHz. While I usually prefer to avoid playing the sound from the Python interpreter (I use ipython -pylab), I just wondered if my old install worked. As a matter of fact, when I read data using audiolab (Sndfile or with wavread), then I get an array which cannot be played "as is"! It seems that it needs to be transposed so that it works (see the output error below).

I guess it's just about changing the number of channels in the soundio/play.py file. At least, it feels that there should be some compatibility between the way the data is stored in the array from the read functions, and the way it is handled in the method play. What do you think? My installation is not recent, but never really tried that before (actually probably ran into that error before, but never dug much into it). From my understanding, I don't believe that's due to my installation configuration, but if you need more details, I can dig a bit more.

Also, I m just wondering: while the wrapper seems to work fine and rely on libsndfile for all "advanced" stuff, is there gonna be any further development effort on this project? Is it still active? (and does it need to be active at all, anyway ?!!) Always thought that module would be perfect if included in some "bigger" module, such as numpy or more likely scipy, so that there is even less barrier for audio signal processing researcher who want to come from Matlab to Python!

Here is the output of the error:

In [24]: data.shape 
Out[24]: (1767316, 2)

In [25]: fs
Out[25]: 44100

In [26]: al.play(data,fs)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/Users/.../<ipython-input-26-8ecea18253de> in <module>()
----> 1 al.play(data,fs)

/Users/.../Library/Python/2.7/lib/python/site-packages/scikits.audiolab-0.11.0-py2.7-macosx-10.5-x86_64.egg/scikits/audiolab/soundio/play.pyc in play(input, fs)
    107     handle mono on its own.
    108     """
--> 109     return _play(input, fs)

/Users/.../Library/Python/2.7/lib/python/site-packages/scikits.audiolab-0.11.0-py2.7-macosx-10.5-x86_64.egg/scikits/audiolab/soundio/play.pyc in _play(input, fs)
     79                   "Only input of rank 1 and 2 supported for now."
     80 
---> 81         dev = CoreAudioDevice(fs=fs, nchannels=nc)
     82         dev.play(input)
     83 else:

/Users/.../Library/Python/2.7/lib/python/site-packages/scikits.audiolab-0.11.0-py2.7-macosx-10.5-x86_64.egg/scikits/audiolab/soundio/macosx_backend.so in macosx_backend.CoreAudioDevice.__init__ (scikits/audiolab/soundio/macosx/macosx_backend.c:1077)()

RuntimeError: Error while setting stream format.

In [27]: al.play(data.T,fs) # this works just fine

In [28]: 

Cheers!
Jean-Louis

TypeError: not enough arguments for format string

There is a small error near line 746 in scikits/audiolab/pysndfile/_sndfile.pyx:
raise IOError("write %d frames, expected to write %d" % res, nframes)
should be
raise IOError("write %d frames, expected to write %d" % (res, nframes))

libsndfile error handling

Hi David,
using audiolab for a few years, I looked to the TODO list (in the docs) to see if I could help somehow. You wrote one of the next goal is to «support the libsndfile’s error system».

If i understand http://www.mega-nerd.com/libsndfile/api.html#error , each call to functions sf_xxx taking a SndFile pointer as input is able to store a error code in this structure (less sf_open and sf_open_fd that return a NULL pointer in case of failed opening of file). Do you confirm that to support this error system, we need to check the error code (through the sf_error function). If non zero, next step is to invoke sf_strerror to get a description of error and raise the adequate pythonic exception.

Are you OK with that?

mp3 support

Hey, this library is kinda useless without mp3 support. When will it be added?

Sound playback issue on Mac OS X 10.7

I don't know if this is a Lion-specific bug (I haven't been able to test it yet on Snow Leopard or below), but if I call

play(frames)

or

play(frames, 44100)

(which are equivalent because of the default) the audio is played at half speed. If I call

play(frames, 88200)

the audio plays properly. As far as I can tell, this isn't a bug in audiolab itself... is it possible that CoreAudio changed with 10.7? Has anyone else seen this problem?

python scikits.audiolab Sndfile special chars in file name

Hi ,
I am trying to get a wav file information but Sndfile is unable to read file with special characters in path and file name(查找問題daw.wav) , i am unable to get information in any way i mentioned in the code , i tried passing file path to Sndfile with diferent encoding to but didnt work , but if i pass this 'C:\Users\Furqan\Desktop\test\DAW\1.wav' it works fine ,
Help me !
Thanks is advance

My Code is

-- coding: UTF-8 --

from scikits.audiolab import Sndfile
from os import walk, path, stat

track1 =  r'C:\Users\Furqan\Desktop\test\查找問題daw\1.wav'
#track1 = r'C:\Users\Furqan\Desktop\test\DAW\1.wav'

try:
    track_one_file_obj = Sndfile(track1, 'r')
except:

    print('Simple didnt work')
    print(Exception.message)
    print('')
    pass

try:
    track_one_file_obj = Sndfile(track1.decode('cp1252'), 'r')
except:
    print('cp1252 didnt work')
    print(Exception.message)
    print('')
    pass

try:
    track_one_file_obj = Sndfile(track1.encode('utf-8'), 'r')
    print(track_one_file_obj)
except:
    print('encode didnt work')
    print(Exception.message)
    print('')
    pass


try:
    track_one_file_obj = Sndfile(track1.encode('utf8'), 'r')
    print(track_one_file_obj)
except:
    print('encode didnt work')
    print(Exception.message)
    print('')
    pass

try:
    track_one_file_obj = Sndfile(track1.decode('utf-8'), 'r')
    print(track_one_file_obj)
except:
    print('decode didnt work')
    print(Exception.message)
    print('')
    pass

try:
    track_one_file_obj = Sndfile(track1.decode('utf8'), 'r')
    print(track_one_file_obj)
except:
    print('decode didnt work')
    print(Exception.message)
    print('')
    pass

print(track_one_file_obj.nframes)

Importing Audiolab fails (OSX 10.3.2 + Python 3.6.4)

in ipython:
In [8]: import scikits.audiolab

ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 import scikits.audiolab

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scikits/audiolab/init.py in ()
20 COPYING.txt for details. """
21
---> 22 from version import version as _version
23 version = _version
24

ModuleNotFoundError: No module named 'version'

Audiolab not working with Anaconda

I'm having trouble installing Audiolab. When I run install an error message states: 'Python version 2.6 required, which was not found in the registry'.

I am currently running Anaconda, which comes with version 2.7.

Any advice on how to install Audiolab would be really appreciated.

Many thanks,

Alison

Can't read data from file with unknown number of frames

I want to read the audio out of a .mov file, so I'm doing

child = subprocess.Popen(["avconv", "-i", "myfile.mov", "-f", "au", "-"], stdout=subprocess.PIPE)
my_sndfile = Sndfile(child.stdout.fileno())

This calls avconv (from ffmpeg) to feed the data directly into my process (no need for temporary files), and that's great. But:

  • my_sndfile.nframes contains nonsense: Okay, so I don't know how many frames to read, not a surprise given it's coming from a pipe. (It would be nice if nframes in this situation were None or -1 or something; instead I'm getting 2305843009213693945L.)
  • If I just call read_frames with a large value, hoping to get all the frames, I get:
In [76]: d = s.read_frames(10000000)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-76-cb9a61676b12> in <module>()
----> 1 d = s.read_frames(10000000)

/home/njs/.user-python2.7-64bit/local/lib/python2.7/site-packages/scikits.audiolab-0.11.0-py2.7-linux-x86_64.egg/scikits/audiolab/pysndfile/_sndfile.so in scikits.audiolab.pysndfile._sndfile.Sndfile.read_frames (scikits/audiolab/pysndfile/_sndfile.c:5361)()

/home/njs/.user-python2.7-64bit/local/lib/python2.7/site-packages/scikits.audiolab-0.11.0-py2.7-linux-x86_64.egg/scikits/audiolab/pysndfile/_sndfile.so in scikits.audiolab.pysndfile._sndfile.Sndfile.read_frames_double (scikits/audiolab/pysndfile/_sndfile.c:5749)()

RuntimeError: Asked 10000000 frames, read 573440

Sort of frustrating... it's telling me it managed to read the frames, but... then it threw them away and raised an exception. So the frames are there, but it's impossible for me to get at them. I expected this to allow for a shorter return value, like POSIX read or Python file.read.

The only solution I can see is to call read_frames(1) in a loop, which is silly, but there you go.

pip install numpy

Hi!

I have created a virtualenv and then inside of it I run

pip install -r requirements.txt

requirements.txt contains 2 items/lines: numpy scikits.audiolab

Installing scikits.audiolab fails with

ImportError: No module named numpy.distutils.core

Partial solution is to run pip in two stages:

pip install --no-install -r requirements.txt
pip install --no-download -r requirements.txt

but still the scikits.audiolab must be on the last line because it will stop the "--no-install" stage.

David

Audiolab issue with Numpy 1.6.0b2

David,

I recently upgraded to the newest version of numpy 1.6.0b2 and seems to have issues with scikits.audiolab as I'm getting this error:

/home/bigtyme/Dropbox/Research/Code/AudModel/numpy.pxd in scikits.audiolab.pysndfile._sndfile (scikits/audiolab/pysndfile/_sndfile.c:9632)()

ValueError: numpy.dtype does not appear to be the correct type object

Do you know anything about this?? I will try going back to previous version to see if it corrects this.

basic_reader: argument 'first' ignored when 'last' is specified

File: scikits.audiolab.pysndfile.matapi.py
Function: basic_reader(filename, last = None, first = 0)
Outer Function: _reader_factory(name, filetype, descr)

When using functions like scikits.audiolab.wavread, the argument first is ignored, when last is specified.
wavread(filename, first=0, last=48) returns the first 48 frames (frame 0 through frame 47).
wavread(filename, first=48, last=96) returns the first 96 frames. It should return frames 48 through 95, instead.

Code snippet in scikits.audiolab (0.11.0) scikits.audiolab.pysndfile.matapi.basic_reader :

    if last is None:
        nframes = hdl.nframes - first
        data    = hdl.read_frames(nframes)
    else:
        data    = hdl.read_frames(last)

Proposed solution:

    if last is None:
        last = hdl.nframes
    data = hdl.read_frames(last-first) 

binary for python 2.7 on windows needed

https://files.pythonhosted.org/packages/ea/ce/85c5ebddb3a0061ea37f554796966f4e4a6ad7951da99f563d3db4bb8c12/scikits.audiolab-0.11.0.win32-py2.6.exe from https://pypi.org/project/scikits.audiolab/#files resists installation on Windows with Python27

One solution might be to provide binaries for python2.7

Another solution might be to provide working, complete install instructions for Windows with python27. Currently still trying to figure out whether this is at all possible.

Audiolab compile fails in OSX + workaround

  1. FAILS COMPILE & WORKAROUND (OSX 10.13.2 / Python 3.6.4):

pip install scikits.audiolab
. . .
downloads and compiles some things successfully, but chokes with
/Developer/SDKs/MacOSX10.6.sdk/usr/include/float.h
which has
#if defined(GNUC)
#include_next <float.h>
as clang fails to find the latter float.h

Hence, added in ~/.profile:
C_INCLUDE_PATH="./:/usr/include/:${C_INCLUDE_PATH}”
export C_INCLUDE_PATH

However, clang still did not see /usr/include/float.h, so then
modified
/Developer/SDKs/MacOSX10.6.sdk/usr/include/float.h
replacing
#include_next <float.h>
with
#include <float.h>
and compile worked. The install apparently completed ok.

Interleaving bug

From Dr. Gabriël J.L. Beckers

"""
If you read a stereo file with "f.read_frames(f.nframes)", then the samples of each channel are in the correct columns, but if you add a dtype argument while reading exactly the same data "f.read_frames(f.nframes, dtype=np.float32)", then samples from both channels end up in both columns, so that each column now has interleaved data.
"""

script + wav in my gmail inbox

How to run the bundled tests?

I'm trying to create a FreeBSD port of this software, and wish to run the bundled self-tests to verify the build before installing. How is this supposed to be done?

The python setup.py test does not work. What is the right way to invoke the tests? Thank you!

Failed import in Windows with Python 2.6

Previously discussed by email:

In [1]: 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.

Modify FLAC compression level

When doing :

f = Sndfile('myfile.flac', 'w', Format('flac'), 2, 44000),

would it be possible to change the "FLAC encoding level" in order to increase the FLAC compression speed (with a lower compression ratio) ?

Python 3 support

Audiolab isn't compatible with Python 3. It would be nice if it were.

I'll start work on this now in a fork of my own, but I'm submitting the issue in case (a) you've already tried this and have any tips, and (b) I get stuck and need to ask questions.

install trouble

1. easy_install scikits.audiolab

error: sndfile (http://www.mega-nerd.com/libsndfile/) library not found.

2. pip install scikits.audiolab

error: sndfile (http://www.mega-nerd.com/libsndfile/) library not found.

$ locate libsndfile

/usr/lib/libsndfile.a
/usr/lib/libsndfile.la
/usr/lib/libsndfile.so
/usr/lib/libsndfile.so.1
/usr/lib/libsndfile.so.1.0.23

$ locate sndfile.h

/usr/include/sndfile.h
/usr/include/sndfile.hh
/usr/include/wx-2.8/wx/mmedia/sndfile.h

3. git clone && python setup.py install

error: sndfile (http://www.mega-nerd.com/libsndfile/) library not found.

* site.cfg:

[sndfile]
library_dirs = /usr/lib/
include_dirs = /usr/include/
libraries = sndfile,vorbis,vorbisenc,FLAC,ogg

4. python setup.py install

SndfileInfo:
FOUND:
libraries = ['sndfile', 'vorbis', 'vorbisenc', 'FLAC', 'ogg', 'sndfile', 'vorbis', 'vorbisenc', 'FLAC', 'ogg']
library_dirs = ['/usr/lib/']
include_dirs = ['/usr/include/']

AlsaInfo:
libraries asound not found in /usr/local/lib
alsa not found
scikits/audiolab/soundio/setup.py:21: UserWarning: Alsa not found - alsa backend not build
warnings.warn("Alsa not found - alsa backend not build")

$ aptitude show libasound2-dev

Package: libasound2-dev
State: installed
Automatically installed: no
Version: 1.0.24.1-0ubuntu5
Priority: optional
Section: libdevel
Maintainer: Ubuntu Core Developers [email protected]
Uncompressed Size: 1 946 k
Depends: libc6-dev | libc-dev, libasound2 (= 1.0.24.1-0ubuntu5)
Suggests: libasound2-doc
Conflicts: alsa-headers, libasound-dev
Replaces: alsa-headers, libasound2 (< 0.9.0rc7-2)
Provides: libasound-dev
Description: shared library for ALSA applications -- development files
This package contains files required for developing software that makes use of libasound2, the ALSA library.

ALSA is the Advanced Linux Sound Architecture.
Homepage: http://www.alsa-project.org/

W.T.F.?

Binaries for Mac

Documentation mentions that binaries for mac are available on Pypi. It seems not (unless there is an extended list of downloadables somewhere)...

Make Sndfile a "With Statement Context Manager"?

It would be nice to be able to use Sndfile like this:

from scikits.audiolab import Sndfile
with Sndfile("test.wav") as f:
    # do something with f
    print(f)

# no need to call f.close()!

Of course, contextlib.closing could be used for that, but why not support the with statement directly?
And, if I'm not mistaken, implementing this would be straightforward, just include the following within the class definition of Sndfile:

def __enter__(self):
    return self

def __exit__(self, *ignored_args)
    self.close()

Unable to install on Ubuntu 18.04

Hello,

I can't install the package. I tried both pip and installing from source. It didn't work. I installed libsndfile1-dev and confirmed that it exists. I am using an anaconda environment with python 3.7. Here are my command line outputs:

python setup.py install
SndfileInfo:
customize UnixCCompiler
libraries sndfile not found in /home/tatar/anaconda3/envs/tf-rc1/lib
customize UnixCCompiler
FOUND:
libraries = ['sndfile']
library_dirs = ['/usr/local/lib']
include_dirs = ['/usr/local/include']

AlsaInfo:
customize UnixCCompiler
libraries asound not found in /home/tatar/anaconda3/envs/tf-rc1/lib
customize UnixCCompiler
libraries asound not found in /usr/local/lib
customize UnixCCompiler
libraries asound not found in /usr/lib
customize UnixCCompiler
FOUND:
libraries = ['asound']
library_dirs = ['/usr/lib/x86_64-linux-gnu']
include_dirs = ['/usr/include']

CoreAudioInfo:
audiolab/soundio/setup.py:31: UserWarning: CoreAudio not found - CoreAudio backend not build
warnings.warn("CoreAudio not found - CoreAudio backend not build")
running install
running bdist_egg
running egg_info
running build_src
build_src
building extension "audiolab.pysndfile._sndfile" sources
building extension "audiolab.soundio._alsa_backend" sources
building data_files sources
build_src: building npy-pkg config files
creating scikits.audiolab.egg-info
writing scikits.audiolab.egg-info/PKG-INFO
writing dependency_links to scikits.audiolab.egg-info/dependency_links.txt
writing requirements to scikits.audiolab.egg-info/requires.txt
writing top-level names to scikits.audiolab.egg-info/top_level.txt
writing manifest file 'scikits.audiolab.egg-info/SOURCES.txt'
reading manifest file 'scikits.audiolab.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'scikits/audiolab/test_data/original.aif'
warning: no files found matching 'scikits/audiolab/test_data/test.aiff'
warning: no files found matching 'scikits/audiolab/test_data/test.au'
warning: no files found matching 'scikits/audiolab/test_data/test.flac'
warning: no files found matching 'scikits/audiolab/test_data/test.raw'
warning: no files found matching 'scikits/audiolab/test_data/test.sdif'
warning: no files found matching 'scikits/audiolab/test_data/test.wav'
warning: no files found matching '' under directory 'docs/pdf'
warning: no files found matching '
' under directory 'docs/html'
warning: manifest_maker: MANIFEST.in, line 19: 'recursive-include' expects

...

warning: manifest_maker: MANIFEST.in, line 20: 'recursive-include' expects

...

warning: no files found matching 'scikits/audiolab/pysndfile/_sndfile.pyx'
warning: no files found matching 'scikits/audiolab/soundio/macosx/macosx_backend.pyx'
warning: no files found matching 'scikits/audiolab/soundio/alsa/_alsa_backend.pyx'
warning: no files found matching 'scikits/audiolab/pysndfile/_sndfile.c'
warning: no files found matching 'scikits/audiolab/soundio/macosx/macosx_backend.c'
warning: no files found matching 'scikits/audiolab/soundio/alsa/_alsa_backend.c'
writing manifest file 'scikits.audiolab.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/audiolab
copying audiolab/init.py -> build/lib.linux-x86_64-3.7/audiolab
copying audiolab/info.py -> build/lib.linux-x86_64-3.7/audiolab
copying audiolab/version.py -> build/lib.linux-x86_64-3.7/audiolab
copying audiolab/setup.py -> build/lib.linux-x86_64-3.7/audiolab
creating build/lib.linux-x86_64-3.7/audiolab/tests
copying audiolab/tests/testcommon.py -> build/lib.linux-x86_64-3.7/audiolab/tests
copying audiolab/tests/init.py -> build/lib.linux-x86_64-3.7/audiolab/tests
copying audiolab/tests/test_pysndfile.py -> build/lib.linux-x86_64-3.7/audiolab/tests
copying audiolab/tests/test_sndfile.py -> build/lib.linux-x86_64-3.7/audiolab/tests
copying audiolab/tests/test_matapi.py -> build/lib.linux-x86_64-3.7/audiolab/tests
creating build/lib.linux-x86_64-3.7/audiolab/soundio
copying audiolab/soundio/init.py -> build/lib.linux-x86_64-3.7/audiolab/soundio
copying audiolab/soundio/play.py -> build/lib.linux-x86_64-3.7/audiolab/soundio
copying audiolab/soundio/setuphelp.py -> build/lib.linux-x86_64-3.7/audiolab/soundio
copying audiolab/soundio/setup.py -> build/lib.linux-x86_64-3.7/audiolab/soundio
creating build/lib.linux-x86_64-3.7/audiolab/pysndfile
copying audiolab/pysndfile/compat.py -> build/lib.linux-x86_64-3.7/audiolab/pysndfile
copying audiolab/pysndfile/sndfile.py -> build/lib.linux-x86_64-3.7/audiolab/pysndfile
copying audiolab/pysndfile/init.py -> build/lib.linux-x86_64-3.7/audiolab/pysndfile
copying audiolab/pysndfile/matapi.py -> build/lib.linux-x86_64-3.7/audiolab/pysndfile
copying audiolab/pysndfile/setuphelp.py -> build/lib.linux-x86_64-3.7/audiolab/pysndfile
copying audiolab/pysndfile/setup.py -> build/lib.linux-x86_64-3.7/audiolab/pysndfile
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'audiolab.pysndfile._sndfile' extension
compiling C sources
C compiler: gcc -pthread -B /home/tatar/anaconda3/envs/tf-rc1/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC

creating build/temp.linux-x86_64-3.7/audiolab
creating build/temp.linux-x86_64-3.7/audiolab/pysndfile
compile options: '-I/usr/local/include -I/home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include -I/home/tatar/anaconda3/envs/tf-rc1/include/python3.7m -c'
gcc: audiolab/pysndfile/_sndfile.c
In file included from /home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830:0,
from /home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from audiolab/pysndfile/_sndfile.c:112:
/home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with "
^~~~~~~
audiolab/pysndfile/_sndfile.c: In function ‘__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_version’:
audiolab/pysndfile/_sndfile.c:981:15: warning: implicit declaration of function ‘PyString_FromStringAndSize’; did you mean ‘PyBytes_FromStringAndSize’? [-Wimplicit-function-declaration]
__pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = LINE; goto __pyx_L1_error;}
^~~~~~~~~~~~~~~~~~~~~~~~~~
PyBytes_FromStringAndSize
audiolab/pysndfile/_sndfile.c:981:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
__pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = LINE; goto __pyx_L1_error;}
^
audiolab/pysndfile/_sndfile.c: In function ‘pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init’:
audiolab/pysndfile/_sndfile.c:1861:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
__pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = LINE; goto __pyx_L1_error;}
^
audiolab/pysndfile/_sndfile.c:1947:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
__pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = LINE; goto __pyx_L1_error;}
^
audiolab/pysndfile/_sndfile.c: In function ‘__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_double’:
audiolab/pysndfile/_sndfile.c:5595:14: warning: variable ‘__pyx_bshape_1_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bshape_1_ty = 0;
^~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:5594:14: warning: variable ‘__pyx_bshape_0_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bshape_0_ty = 0;
^~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:5593:14: warning: variable ‘__pyx_bstride_1_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bstride_1_ty = 0;
^~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:5592:14: warning: variable ‘__pyx_bstride_0_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bstride_0_ty = 0;
^~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c: In function ‘__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_float’:
audiolab/pysndfile/_sndfile.c:5804:14: warning: variable ‘__pyx_bshape_1_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bshape_1_ty = 0;
^~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:5803:14: warning: variable ‘__pyx_bshape_0_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bshape_0_ty = 0;
^~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:5802:14: warning: variable ‘__pyx_bstride_1_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bstride_1_ty = 0;
^~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:5801:14: warning: variable ‘__pyx_bstride_0_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bstride_0_ty = 0;
^~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c: In function ‘__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_int’:
audiolab/pysndfile/_sndfile.c:6013:14: warning: variable ‘__pyx_bshape_1_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bshape_1_ty = 0;
^~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:6012:14: warning: variable ‘__pyx_bshape_0_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bshape_0_ty = 0;
^~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:6011:14: warning: variable ‘__pyx_bstride_1_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bstride_1_ty = 0;
^~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:6010:14: warning: variable ‘__pyx_bstride_0_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bstride_0_ty = 0;
^~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c: In function ‘__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_short’:
audiolab/pysndfile/_sndfile.c:6222:14: warning: variable ‘__pyx_bshape_1_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bshape_1_ty = 0;
^~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:6221:14: warning: variable ‘__pyx_bshape_0_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bshape_0_ty = 0;
^~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:6220:14: warning: variable ‘__pyx_bstride_1_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bstride_1_ty = 0;
^~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:6219:14: warning: variable ‘__pyx_bstride_0_ty’ set but not used [-Wunused-but-set-variable]
Py_ssize_t __pyx_bstride_0_ty = 0;
^~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c: In function ‘PyInit__sndfile’:
audiolab/pysndfile/_sndfile.c:9607:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format.format_int = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_format_int;
^
audiolab/pysndfile/_sndfile.c:9608:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format.file_format_int = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format_int;
^
audiolab/pysndfile/_sndfile.c:9609:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format.encoding_int = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding_int;
^
audiolab/pysndfile/_sndfile.c:9610:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format.endianness_int = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_endianness_int;
^
audiolab/pysndfile/_sndfile.c:9611:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format._is_equal = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format__is_equal;
^
audiolab/pysndfile/_sndfile.c:9617:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile._close = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__close;
^
audiolab/pysndfile/_sndfile.c:9618:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile._get_nframes = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__get_nframes;
^
audiolab/pysndfile/_sndfile.c:9619:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_double = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_double;
^
audiolab/pysndfile/_sndfile.c:9620:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_float = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_float;
^
audiolab/pysndfile/_sndfile.c:9621:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_int = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_int;
^
audiolab/pysndfile/_sndfile.c:9622:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_short = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_short;
^
audiolab/pysndfile/_sndfile.c:9623:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_double = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_double;
^
audiolab/pysndfile/_sndfile.c:9624:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_float = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_float;
^
audiolab/pysndfile/_sndfile.c:9625:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_int = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_int;
^
audiolab/pysndfile/_sndfile.c:9626:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_short = (void()(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_short;
^
audiolab/pysndfile/_sndfile.c: In function ‘__Pyx_ExceptionSave’:
audiolab/pysndfile/_sndfile.c:11168:21: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
*type = tstate->exc_type;
^~~~~~~~
curexc_type
audiolab/pysndfile/_sndfile.c:11169:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
audiolab/pysndfile/_sndfile.c:11170:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
audiolab/pysndfile/_sndfile.c: In function ‘__Pyx_ExceptionReset’:
audiolab/pysndfile/_sndfile.c:11179:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
audiolab/pysndfile/_sndfile.c:11180:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
audiolab/pysndfile/_sndfile.c:11181:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
audiolab/pysndfile/_sndfile.c:11182:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = type;
^~~~~~~~
curexc_type
audiolab/pysndfile/_sndfile.c:11183:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
audiolab/pysndfile/_sndfile.c:11184:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
audiolab/pysndfile/_sndfile.c: In function ‘__Pyx_GetException’:
audiolab/pysndfile/_sndfile.c:11357:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
audiolab/pysndfile/_sndfile.c:11358:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
audiolab/pysndfile/_sndfile.c:11359:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
audiolab/pysndfile/_sndfile.c:11360:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = *type;
^~~~~~~~
curexc_type
audiolab/pysndfile/_sndfile.c:11361:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
audiolab/pysndfile/_sndfile.c:11362:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
audiolab/pysndfile/_sndfile.c: In function ‘__Pyx_SetVtable’:
audiolab/pysndfile/_sndfile.c:11399:14: warning: implicit declaration of function ‘PyCObject_FromVoidPtr’; did you mean ‘PyLong_FromVoidPtr’? [-Wimplicit-function-declaration]
pycobj = PyCObject_FromVoidPtr(vtable, 0);
^~~~~~~~~~~~~~~~~~~~~
PyLong_FromVoidPtr
audiolab/pysndfile/_sndfile.c:11399:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
pycobj = PyCObject_FromVoidPtr(vtable, 0);
^
audiolab/pysndfile/_sndfile.c: In function ‘__pyx_PyInt_AsLongLong’:
audiolab/pysndfile/_sndfile.c:11612:25: warning: implicit declaration of function ‘PyNumber_Int’; did you mean ‘PyNumber_And’? [-Wimplicit-function-declaration]
PyObject
tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
^~~~~~~~~~~~
PyNumber_And
audiolab/pysndfile/_sndfile.c:11612:25: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
audiolab/pysndfile/_sndfile.c: In function ‘__pyx_PyInt_AsUnsignedLongLong’:
audiolab/pysndfile/_sndfile.c:11633:25: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
PyObject
tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
^~~~~~~~~~~~
At top level:
audiolab/pysndfile/_sndfile.c:8093:13: warning: ‘pyx_pf_5numpy_7ndarray___releasebuffer’ defined but not used [-Wunused-function]
static void pyx_pf_5numpy_7ndarray___releasebuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:7423:12: warning: ‘pyx_pf_5numpy_7ndarray___getbuffer’ defined but not used [-Wunused-function]
static int pyx_pf_5numpy_7ndarray___getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:21:0,
from /home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from audiolab/pysndfile/_sndfile.c:112:
/home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1463:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
_import_array(void)
^~~~~~~~~~~~~
error: Command "gcc -pthread -B /home/tatar/anaconda3/envs/tf-rc1/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/home/tatar/anaconda3/envs/tf-rc1/lib/python3.7/site-packages/numpy/core/include -I/home/tatar/anaconda3/envs/tf-rc1/include/python3.7m -c audiolab/pysndfile/_sndfile.c -o build/temp.linux-x86_64-3.7/audiolab/pysndfile/_sndfile.o -MMD -MF build/temp.linux-x86_64-3.7/audiolab/pysndfile/_sndfile.o.d" failed with exit status 1

Can't import audio lab, almost fresh ubuntu 14.04

Hi, I am getting this error. I tried installing audiolab from source and also with pip.
Is this a bug, or I am doing something wrong?
Thanks

from scikits.audiolab import play
Traceback (most recent call last):

File "", line 1, in
from scikits.audiolab import play

File "/usr/local/lib/python2.7/dist-packages/scikits/audiolab/init.py", line 25, in
from pysndfile import formatinfo, sndfile

File "/usr/local/lib/python2.7/dist-packages/scikits/audiolab/pysndfile/init.py", line 1, in
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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.