Git Product home page Git Product logo

yaafe's Introduction

Yaafe

Yet Another Audio Feature Extractor

Build status

  • Branch master : travis_master
  • Branch dev : travis_dev
  • Anaconda : anaconda_build

Install

Conda

conda

Yaafe can be easily install with conda. To install this package with conda run:

conda install -c conda-forge yaafe

Docker

docker

Yaafe can also be install through Docker.

Get the official Yaafe image from Yaafe repository on Docker Hub:

docker pull yaafe/yaafe
docker tag yaafe yaafe/yaafe

or build it from the sources directory:

docker build --tag=yaafe .

Following both of the method above, you then have a docker image tagged as yaafe. The yaafe command is the entrypoint for that docker image so you can run 'yaafe' from the command line through docker run yaafe. For example:

docker run -it yaafe --help
docker run -it yaafe --volume=$(pwd):/wd  --workdir=/wd -c resources/featureplan -r 16000 --resample resources/yaafe_check.wav

On Linux, it can be usefull to create an alias for it:

alias yaafe='docker run -it --rm=true --volume=$(pwd):/wd  --workdir=/wd yaafe'

You could then simply run:

yaafe --help
yaafe -l

et voilà !

If you need to set the docker user as the current user on the host, you could try to run docker with the -u $(id -u):$(id -g) option :

docker run -it --rm=true --volume=$(pwd):/wd  --workdir=/wd -u $(id -u):$(id -g) yaafe -c resources/featureplan -o h5 -r 16000 --resample resources/yaafe_check.wav

Last but not least, the entry-point for the yaafe docker image is smart :

  • every command that start with a dash - will be pass as options to the yaafe command inside the docker container
  • every command that does not start with a dash will be treated as a regular command. For example:

    docker run -it yaafe /bin/bash

will give you access to a bash terminal inside the docker. And :

docker run -it yaafe yaafe-engine --help

will launch the yaafe-engine` batch processing tool. From sources ------------ *Yaafe* source code should compile on *linux* and *MacOsX* platform, and uses CMake as compilation tool. Yaafe requires third-party libraries to enable specific features. Some of these libraries may already be available on your system. The `argtable <http://argtable.sourceforge.net/>`_ library is required. The `eigen <http://eigen.tuxfamily.org/>`_ library is also required. You could either installed it through your regular packages manager (e.g. `libeigen3-dev <https://packages.debian.org/search?keywords=libeigen3-dev>`__ on Debian) and then pass the-DWITH_EIGEN_LIBRARY=ONoption flag toccmake. Or you can use the source code provided through the git submodule included in the Yaafe git repository and which you can get with thegit submodule update --initcommand. *If you usedgit clone --recursiveto clone Yaafe, you don't need this.* Depending on optional features you want to use, other librairies may be used: * `libsndfile <http://www.mega-nerd.com/libsndfile/>`_: enable reading WAV files format (highly recommanded) * `libmpg123 <http://www.mpg123.de/api/>`_: enable reading MP3 audio files * `HDF5 <http://www.hdfgroup.org/HDF5/>`_ >= 1.8: enable H5 output format * `liblapack <http://www.netlib.org/lapack/>`_: enable some audio features (LSF) * `FFTW3 <http://www.fftw.org/>`_: use FFTW instead of Eigen for FFT computations (pay attention to licensing issues when linking with the GPL FFTW3 library). To use the *yaafe* script you need Python >= 2.5, and the numpy package. Once previous libraries are installed (some may have been locally installed in <lib-path>), you can compile with the following steps: :: mkdir build cd build ccmake -DCMAKE_PREFIX_PATH=<lib-path> -DCMAKE_INSTALL_PREFIX=<install-path> .. make make install If you use an external eigen library (and not the one provided by git submodule), don't forget to add the flag: :: ccmake -DCMAKE_PREFIX_PATH=<lib-path> -DCMAKE_INSTALL_PREFIX=<install-path> -DWITH_EIGEN_LIBRARY=ON .. Several options can control Yaafe compilation. More details can be found at: http://yaafe.sourceforge.net/manual/install.html Environment ~~~~~~~~~~~ To easily use Yaafe, you should set the following environment vars:: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DEST_DIR/lib On MacOSX replaceLD_LIBRARY_PATHbyDYLD_FALLBACK_LIBRARY_PATHThe output ofmake installshould give you the INSTALL_DIR path (defaults to/usr/local). The python files are installed in/usr/local/lib/python2.7/site-packages, which is *not* by default in the python path on MacOSX. The consequence is the errorERROR: cannot load yaafe packages: No module named yaafelib. There are 3 ways to solve this problem : * The simplest way is to add the linesys.path.append("/usr/local/lib/python2.7/site-packages")in/usr/local/bin/yaafeafterfrom optparse import OptionParser, but it won't let you use the yaafelib unless you add this line (and import sys) before each import of yaafelib. * You can useexport PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATHor add it to your ~/.bash_profile, but this will affect other versions of python. * You can move the files to a site-package folder that is in your PYTHONPATH: * if you use Python 2:mv /usr/local/lib/python2.7/site-packages/yaafefeatures.py /usr/local/lib/python2.7/site-packages/yaafelib python -c 'import sys, re ; print next(i for i in sys.path if re.match(".*site-packages$", i))' * if you use Python 3: mv /usr/local/lib/python2.7/site-packages/yaafefeatures.py /usr/local/lib/python2.7/site-packages/yaafelib `python3 -c 'import sys, re ; print(next(i for i in sys.path if re.match(".*site-packages$", i)))'`

If you use Matlab, you can set your MATLABPATH var:

export MATLABPATH=$MATLABPATH:$DEST_DIR/matlab

Documentation

Documentation is also available online: http://yaafe.github.io/Yaafe/ (mirror: http://yaafe.sourceforge.net/)

To build documentation, you need Sphinx. Before building documentation, you should set your environment correctly so that sphinx builds documentation with automatic features documentation.

To build documentation, just run make doc_python in the build directory. Documentation is built in doc/doc_python/html.

License

YAAFE is released under the version 3 of the GNU Lesser General Public License. Read COPYING and COPYING.LESSER for more details. The user should also read DISCLAIMER before linking with optional libraries which have different license policy.

Support

To get help with YAAFE, use the mailing-list [email protected] (registration at https://lists.sourceforge.net/lists/listinfo/yaafe-users ).

Credits

Yaafe was first developed at Telecom Paristech / AAO Team. It uses several great open-source projects like Eigen, Smarc, libsndfile, mpg123, HDF5.

If you want to cite Yaafe in a publication, please see CITATION.

yaafe's People

Contributors

abdealiloko avatar bmat06 avatar braingineer avatar crococode avatar geniass avatar gholzmann avatar hbredin avatar louisabraham avatar mckelvin avatar piem avatar rhyolight avatar romi1502 avatar strob avatar thomasfillon avatar yomguy 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  avatar  avatar  avatar  avatar  avatar

yaafe's Issues

Sample rate has no default value

When I use yaafe -f "cqt: CQT" KR.mp3 for example, I get the error "ERROR: please specify sample rate !" though the file has a sample rate (I can see it in its metadata), and the help (yaafe -h) specifies :
-r SAMPLE_RATE, --rate=SAMPLE_RATE working samplerate in Hz. If not set, use input file sample rate.

If I add the parameter yaafe -r 44100 -f "cqt: CQT" KR.mp3, it just works fine.

Docs are down

The docs, hosted on Sourceforge, are inaccessible because Sourceforge is experiencing infrastructure issues. Given that developers seem to be moving away from Sourceforge generally, would it perhaps be worth moving (or hosting a redundant copy of the docs) on GitHub pages?

AttributeError

Hi,

I try to run yaafe.py, but when I do so I get this error message:

File "yaafe.py", line 32, in <module> import yaafelib as yaafe File "/Users/jw/yaafe/python_packages/yaafelib/__init__.py", line 36, in <module> from core import * File "/Users/jw/yaafe/python_packages/yaafelib/core.py", line 52, in <module> yaafecore.destroyFactory.restype = None File "/Users/jw/anaconda/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__ func = self.__getitem__(name) File "/Users/jw/anaconda/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(0x1003a3db0, destroyFactory): symbol not found

Now in core.py I replaced line 29 yaafecore = cdll.LoadLibrary(path/to/libyaafecore.so) with yaafecore = cdll.LoadLibrary(path/to/libyaafe-core.0.dylib) because it asked me to do this first when I tried to run yaafe.py.

Can somebody help me to solve this problem?

ERROR WITH OPENING MP3 FILES

Hey,
There is a 'File access error' when I try to run a demo. Any help?

process file ./test.mp3
Trouble with mpg123: File access error. (code 22) 
ERROR: cannot initialize reader MP3FileReader for file ~/test.mp3
/usr/lib/python2.7/dist-packages/numpy/core/_methods.py:55: RuntimeWarning: Mean of empty slice.
  warnings.warn("Mean of empty slice.", RuntimeWarning)
 /usr/lib/python2.7/dist-packages/numpy/core/_methods.py:65: RuntimeWarning: invalid value    encountered in true_divide
  ret, rcount, out=ret, casting='unsafe', subok=False)
/usr/lib/python2.7/dist-packages/numpy/core/_methods.py:79: RuntimeWarning: Degrees of freedom <= 0 for slice
  warnings.warn("Degrees of freedom <= 0 for slice", RuntimeWarning)
 /usr/lib/python2.7/dist-packages/numpy/core/_methods.py:91: RuntimeWarning: invalid value     encountered in true_divide
  arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
/usr/lib/python2.7/dist-packages/numpy/core/_methods.py:111: RuntimeWarning: invalid value   encountered in true_divide
  ret, rcount, out=ret, casting='unsafe', subok=False)

THE DEMO IS :

`

 from yaafelib import *
 import sys

def getFeature(path):
    fp = FeaturePlan(sample_rate=44100, resample=True, time_start=10,time_limit=20)  
    fp.addFeature("energy: Energy")

    df = fp.getDataFlow()   
    engine = Engine()
    engine.load(df)

    afp = AudioFileProcessor()
    afp.processFile(engine, path)
    features = engine.readAllOutputs()

    energy = features.get('energy')
    energyMean=energy.mean(axis=0) 
    energyVar =energy.var(axis=0) 

    print energyMean[0]
    print energyVar[0]

    return 


if __name__ == '__main__':
    #print sys.path
    path='./test.mp3'
    getFeature(path)

`

Check readme.rst

Merge conflict has cancel the effects of #7
Some typo/grammar corrections may be to be done again.

ERROR WITH OPENING WAV FILES BUT MP3 FILE IS OK.

When I was testing yaafe, an error occurred with opening wav files. But there was no wrong with opening mp3 files. I am sure that libsndfile is installed on my system.

the source code:

from yaafelib import FeaturePlan,Engine,AudioFileProcessor




def init():
    global engine
    fp = FeaturePlan(sample_rate=44100, resample= True, time_start=20, time_limit=40)
    fp.addFeature('mfcc: MFCC')       
    fp.addFeature("energy: Energy")    
    fp.addFeature("zcr: ZCR")         
    df = fp.getDataFlow()
    engine = Engine()                  
    engine.load(df)
    return 'init'

def startEngine(path):
    global afp,features
    afp = AudioFileProcessor()
    afp.processFile(engine, path)
    features = engine.readAllOutputs()
    return 'success'



def getMFCC():
    mfcc = features.get('mfcc')
    mfccMean=mfcc.mean(axis=0)       
    mfccMean=mfccMean.reshape(-1,)
    mfccVar=mfcc.var(axis=0)         
    mfccVar=mfccVar.reshape(-1,)
    return mfccMean, mfccVar



def main():
    init()
    #startEngine('/home/lxc/Documents/sound/audio_sample_data/mysound/lady.mp3')
    startEngine('/home/lxc/Documents/sound/audio_sample_data/mysound/sound1.m4a')
    print getMFCC()


if __name__ == '__main__':
    main()

the error with opening wav files.

/home/lxc/anaconda2/bin/python /home/lxc/PycharmProjects/MFCC/mfcc.py
process file /home/lxc/Documents/sound/audio_sample_data/mysound/sound1.wav
initializing Smarc resampler 11025 => 44100
Smarc resampler ok !
ERROR: audio file /home/lxc/Documents/sound/audio_sample_data/mysound/sound1.wav is not seekable!
ERROR: cannot initialize reader AudioFileReader for file /home/lxc/Documents/sound/audio_sample_data/mysound/sound1.wav
/home/lxc/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:59: RuntimeWarning: Mean of empty slice.
  warnings.warn("Mean of empty slice.", RuntimeWarning)
/home/lxc/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:68: RuntimeWarning: invalid value encountered in true_divide
  ret, rcount, out=ret, casting='unsafe', subok=False)
/home/lxc/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:82: RuntimeWarning: Degrees of freedom <= 0 for slice
  warnings.warn("Degrees of freedom <= 0 for slice", RuntimeWarning)
/home/lxc/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:94: RuntimeWarning: invalid value encountered in true_divide
  arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
/home/lxc/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:114: RuntimeWarning: invalid value encountered in true_divide
  ret, rcount, out=ret, casting='unsafe', subok=False)
(array([ nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
        nan,  nan]), array([ nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
        nan,  nan]))

Process finished with exit code `0`

Build does not create yaafe_extensions directory

When building yaafe on my ubuntu machine, no errors were thrown during the build process. However, the build did not create a yaafe_extensions directory, and therefore I cannot successfully load the python module.

Please help!

os x install using hp5

Hi, if I configure an install WITH_HDF5 I get the following error (and 4 more similar) with make:

/yaafe/src_cpp/yaafe-python/yaafecoreH5.cpp:69:56: error: use of undeclared identifier  'H5P_DEFAULT'
hid_t h5file = H5Fopen(h5filename, H5F_ACC_RDONLY, H5P_DEFAULT);

H5P_DEFAULT is defined in "H5Ppublic.h"
so, by including this file in "yaafe-python/yaafecoreH5.cpp" :

#ifdef WITH_HDF5
#include "H5Fpublic.h"
#include "H5Gpublic.h"
#include "H5Opublic.h"
#include "H5Dpublic.h"
#include "H5Ppublic.h"
#include "H5PTpublic.h"
#include "H5LTpublic.h"
#include "H5Tpublic.h"
#include "H5Apublic.h"
#endif

the problem goes away. The question is, is this the proper solution?
many thanks
Dave Greenwood

Segmentation Fault with "TemporalShapeStatistics > Derivate" on some files

Hallo!

I get crashes when computing the derivative of a TemporalShapeStatistics feature on some rare input audio files (all tested with latest Yaafe master branch, on Ubuntu).

How to reproduce the crash:

from yaafelib import *

# Link to the example audiofile:
# https://www.dropbox.com/s/0ypcwyhp8exzq1z/crash-yaafe-derivative-16k.wav?dl=0
audiofile = "crash-yaafe-derivative-16k.wav" 

fp = FeaturePlan(sample_rate=16000)
fp.addFeature('tempshape_d1: TemporalShapeStatistics blockSize=1024 stepSize=512 > Derivate DOrder=1')
df = fp.getDataFlow()
engine = Engine()
engine.load(df)


afp = AudioFileProcessor()
afp.processFile(engine, audiofile)
feats = engine.readAllOutputs()

The segmentation fault happens in Yaafe/src_cpp/yaafe-core/ComponentHelpers.h, line 189:

      while (!in->empty())
      {
        const double* inPtr = in->readToken();  // <- here it crashes !!!!!!
        double* outPtr = out->writeToken();
        for (int i=0;i<m_size;i++)
        {
            ...

I tried to fix the problem, but I am not really sure how to not interfere with the underlying algorithm.
It would be highly appreciated, if anyone has some tips how to fix that - please let me know if I can help in any way!

Thanks a lot,
LG
Georg

Slow normalization on MP3 file

I tried the following code:

import yaafelib as yaafe

fp = yaafe.FeaturePlan(sample_rate=44100, normalize=None)
fp.addFeature("mel: MelSpectrum")
engine = yaafe.Engine()
engine.load(fp.getDataFlow())
afp = yaafe.AudioFileProcessor()
afp.processFile(engine, "test.mp3")

It runs without any problem with output:

process file test.mp3
done in 0.097622s

however, if I set normalize=0.98 which should be the default value of --normalize-max
the code just keep running over an hour without any result and just hang in line with 100% CPU loading:

process file test.mp3

I tried the sample code from document and set normalize=0.98 and it is no problem, so I suspect this only happen on processing file or even MP3 file ?

ERROR: dataflow must have exactly 1 root node

I have tried building Yaafe following the instructions on Sourceforge and Github, as well as with the install.sh script. I have installed: sudo apt-get install cmake cmake-curses-gui libargtable2-0 libargtable2-dev libsndfile1 libsndfile1-dev libmpg123-0 libmpg123-dev libfftw3-3 libfftw3-dev liblapack-dev so Yaafe compiles and installs fine. $YAAFEPATH is set to /usr/lib/python2.7/dist-packages/yaafelib/yaafe_extensions.

If I run yaafe, for example yaafe "mfcc: MFCC blockSize=1024 stepSize=512" test.wav, I keep getting ERROR: dataflow must have exactly 1 root node. This happens with any of the features. test.wav is just a sine wave I generated with Audacity, but I get the same error with any file including mp3's.

Are there any other logs I can post?

Cannot find output files

I use:

afp.setOutputFormat(format=output_format, outDir=output_dir, params={'Mode': mode})
afp.processFile(engine, wav_file_name)

Yet the output folder is empty.
Rerunning the code tells me the file already exists so no need to write (mode=update).
Where can I get the output file name from the AudioFileProcessor class to verify its location?

conda-forge packages

This issue is meant to keep track of my work on conda-forge packages.

python 3.6 would not install

Fetching package metadata ...........
Solving package specifications: .


UnsatisfiableError: The following specifications were found to be in conflict:
  - python 3.6*
  - yaafe -> python 2.7* -> openssl 1.0.1*
Use "conda info <package>" to see the dependencies for each package.

Can not open libyaafe-python.so

OSError: libyaafe-python.so: cannot open shared object file: No such file or directory
I don't know why this happen.Everything is good when I was installing this.But I can not import yaafelib.Thanks a lot for your help.

Update website please

Hi!

Great library, but one quick hiccup.

Your website seems to be lacking in its pointer to this repo. It could be a good idea to update that for future people trying to use this package. I spent at least 20 minutes messing with things and was about to port your 0.64 code to py3 until someone told me that there's a conda version that's several versions newer than the website version.

Thanks

Dockerfile?

Since yaafe is not yet pip-installable, a sample Dockerfile based on ubuntu or debian would be great :-)

Segmentation fault with a certain file when re-sampling

I am trying to apply MFFC to a dataset with the following plan

def extractFeatures(audiofile):
    fp = FeaturePlan(sample_rate=44100, resample=True)
    fp.addFeature('mfcc: MFCC blockSize=512 stepSize=256')
    df = fp.getDataFlow()
    engine = Engine()
    engine.load(df)
    afp = AudioFileProcessor()
    afp.processFile(engine,audiofile)
    features = engine.readAllOutputs()
    return features

and I get a segmentation fault.

But only when I set the sample rate to 44100 I get a segmentation fault, if I choose 16000 or 48000 everything is fine. Though choosing a value different than 44100 is making my execution time very bad because a lot of resampling happens.

I would appreciate it if anyone could give me a hint on that.

loading data flow is super slow

The stage engine.load(df) in python takes most of the computing time.
Can I share it across different files?
What if these files are in different sample rate?
Can I use the -i option (multiple files) from within the python interfrace?

Docker version asks for python3

I have tried the docker build of Yaafe, but I get the following error (both in the image downloaded from Dockerhub and in the image built from the Dockerfile):

~> docker run -it yaafe --help
/usr/bin/env: python3: No such file or directory

I think there is also a typo in the README:

docker tag yaafe yaafe/yaafe

should be

docker tag yaafe/yaafe yaafe

Best.

Cmake Issue

Hey-
I am getting this error when I try to ccmake yaafe. Any help?

CMake Error at src_cpp/yaafe-core/CMakeLists.txt:24 (add_library):
  Cannot find source file:   /Users/rees/Yaafe/externals/fmemopen/fmemopen.c
 Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error: CMake can not determine linker language for target: yaafe-core
CMake Error in src_cpp/yaafe-core/CMakeLists.txt:
  Exporting the target "yaafe-core" is not allowed since its linker language
  cannot be determined

Easier way to install yaafe?

Hi, Python novice here. I'm trying to figure out how to use yaafe in Linux.

  • One option is to install it using "Conda", which points to "Anaconda" which points to "Miniconda" which doesn't have any command line install as far as I can see, I don't have a GUI on Linux. It also pointed to another application called "fish" for "silent installation" but at so many levels down I just gave up.

  • Then I see you can build it from scratch - but if this is Python, an interpreted language, why does anything have to be compiled?

  • Isn't there just a pip installer (it's the default package manager that comes with Python) or python files I can download? I don't see why this Conda/docker/cmake thing is necessary. I just want to use this .py library :(

Thanks.

Getting rid of git submodules to ease migration to conda-forge

I am currently trying to prepare a conda-forge release of Yaafe.

conda-forge recommends to link to a source archive instead of Github repository.
One way of doing it is to directly link to Yaafe releases in meta.yaml file:

source:
  fn: yaafe-0.70-rc1.tar.gz
  url: https://github.com/Yaafe/Yaafe/archive/0.70-rc1.tar.gz

Unfortunately, this tar.gz file does not contain the code of externals git submodules eigen and fmemopen.

Is there a (legal? technical?) reason not to directly copy eigen and fmemopen source code in externals directory? This would make the conda-forge migration seamless...

pypi package

It would be good to have a pypi package for yaafe for easier installation and also so that it does python dependency handling

Matlab can't open dataflow-file

Hi there,

first of all thanks for that powerful toolbox. It's a great tool.
Unfortunately i can't open the dataflow-file within matlab_r2016b. (I'm under Mac OS 10.12.3)
I tried it with the example in the manual and with a textfile-based featureplan as well:
screenshot 2017-01-31 17 02 09

Then i called yaafe in matlab, but as soon as i want to load the flow-file it is giving me an error

yaafe.load('yaflow')
cannot open file yaflow
Error while loading flow from file yaflow
ans =

  logical

   0

Outside of matlab yaafe is working properly.
Any suggestions?
Thanks in advance

Build error with HDF5

Hi,

I'm trying to compile with macOS Sierra.
With the option WITH_HDF5=ON, I get the following error :

/Users/louisabraham/Downloads/yaafe-v0.65/src_cpp/yaafe-python/yaafecoreH5.cpp:69:56: error: 'H5P_DEFAULT' was not declared in this scope
     hid_t h5file = H5Fopen(h5filename, H5F_ACC_RDONLY, H5P_DEFAULT);

I used the command :
cmake -DWITH_FFTW3=ON -DWITH_HDF5=ON -DWITH_LAPACK=ON -DWITH_MPG123=ON configure ..
And it found HDF5.
-- Found HDF5: /opt/local/lib/libhdf5.dylib

When I try without HDF5 (cmake -DWITH_FFTW3=ON -DWITH_HDF5=OFF -DWITH_LAPACK=ON -DWITH_MPG123=ON configure ..), it works fine !

How to supress console output in yaafelib?

Hello,

I would like to supress console output when processing audio files. I always get messages like:
"process file SOME_FILE
done in 0.000296s"

Is there a way to get rid of these messages?

Thank you

Support of multiple channels in Engine object?

Hello,

I'm trying to make a "live" feature extraction (yes I know about the fact Yaafe gives no guarantee about real time).
For the moment, I test it using stereo files, but I get an error :

fp = FeaturePlan(sample_rate=22050, resample=True, normalize=.98)
fp.addFeature('cqt: CQT')
engine = Engine()
engine.load(fp.getDataFlow())
samplerate, wav = scipy.io.wavfile.read('file.wav')
wav = (wav / 2**16).astype('float64')
cqt = engine.processAudio(wav)['cqt']

I get ERROR: invalid input size ! input 'audio' has size 1.

I looked up in the doc, and found this : http://yaafe.sourceforge.net/manual/pythonbindings.html?highlight=processaudio#yaafelib.Engine.getInputs and saw Others fields should be set to 1..
How I am supposed to use it with stereo data?
Should I use flatten() and double the sample rate?
I don't understand the resample option here: how could you know the samplerate of a numpy array?

I can't use the same code as in the command since it just uses yc.audiofileprocessor_processFile.

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.