Coder Social home page Coder Social logo

echoprint-codegen's Introduction

Codegen for Echoprint

Note: This project is no longer actively maintained

Echoprint is an open source music fingerprint and resolving framework powered by the The Echo Nest. The code generator (library to convert PCM samples from a microphone or file into Echoprint codes) is open source (MIT licensed) and free for any use. The server component that stores and resolves queries is open source (Apache 2 licensed) and free for any use. The data for resolving to millions of songs is free for any use provided any changes or additions are merged back to the community.

Read more about Echoprint here

There are two modes of operation of the Echoprint codegen:

  1. the codegen library (libcodegen) is meant to be linked into code that passes it a buffer of PCM data and will output a code string.

  2. the codegen binary runs standalone, accepts filenames as inputs and runs in a multithreaded worker mode.

Requirements

For libcodegen

  • Boost >= 1.35
  • zlib

Additional requirements for the codegen binary

  • TagLib
  • ffmpeg - this is called via shell and is not linked into codegen

On Ubuntu or Debian you can install these dependencies with:

sudo apt-get install ffmpeg libboost1.42-dev libtag1-dev zlib1g-dev

On OS-X with homebrew you can use:

brew install ffmpeg boost taglib

On Windows:

Refer to the documentation under the windows folder for more specifics.

The binary generated in Windows will be named codegen by default where as on Linux or Mac OS-X it is named echoprint-codegen.

Notes about libcodegen:

Code generation takes a buffer of floating point PCM data sampled at 11025 Hz and mono.

Codegen * pCodegen = new Codegen(const float* pcm, uint numSamples, int start_offset);

pcm: a buffer of floats, mono, 11025 Hz
numSamples: the number of samples
start_offset: creates a hint to the server on where the sample is taken from in the original file if known

string code = pCodegen->getCodeString(); 

The code string is just a base64 encoding of a zlib compression of the original code string, which is a hex encoded series of ASCII numbers. See API/fp.py in echoprint-server for decoding help.

You only need to query for 20 seconds of audio to get a result.

Notes about the codegen binary

The makefile builds an example code generator that uses libcodegen, called "codegen." This code generator has more features -- it will output ID3 tag information and uses ffmpeg to decode any type of file. If you don't need to compile libcodegen into your app you can rely on this. Note that you need to have ffmpeg installed and accessible on your path for this to work.

./echoprint-codegen billie_jean.mp3 10 30

Will take 30 seconds of audio from 10 seconds into the file and output JSON suitable for querying:

{"metadata":{"artist":"Michael jackson", "release":"800 chansons des annes 80", "title":"Billie jean", "genre":"", "bitrate":192, "sample_rate":44100, "seconds":294, "filename":"billie_jean.mp3", "samples_decoded":220598, "given_duration":30, "start_offset":10, "version":4.00}, "code_count":846, "code":"JxVlIuNwzAMQ1fxCDL133+xo1rnGqNAEcWy/ERa2aKeZmW...

You can host your own Echoprint server and ingest or query to that.

Codegen also runs in a multithreaded mode for bulk resolving:

./echoprint-codegen -s 10 30 < file_list

Will compute codes for every file in file_list for 30 seconds starting at 10 seconds. (It tries to be smart about the number of threads to use.) It will output a JSON list.

Statistics

Speed

Codegen scans audio at roughly 250x real time per processor after decoding and resampling to 11025 Hz. This means a full song can be scanned in less than 0.5s on an average computer, and an amount of audio suitable for querying (30s) can be scanned in less than 0.04s.

Decoding from MP3 will be the bottleneck for most implementations. Decoders like mpg123 or ffmpeg can decode 30s mp3 audio to 11025 PCM in under 0.10s.

clump:echoprint-codegen bwhitman$ time mpg123 -q -s -4 -n 1200 song.mp3  > /dev/null
real        0m0.079s
user        0m0.067s
sys         0m0.007s

Accuracy

Look at http://echoprint.me for information on the accuracy of the echoprint system.

FAQ

Q: I get "Couldn't decode any samples with: ffmpeg" when running codegen

A: When running the example code generator (echoprint-codegen) make sure ffmpeg is accessible to your path. Try running ffmpeg filename.mp3 on the file you are testing the code generator with. If it doesn't work, codegen won't work.

echoprint-codegen's People

Contributors

alastair avatar alnesbit avatar artgillespie avatar echoajohnson avatar efsavage avatar hatstand avatar jhurliman avatar perploug avatar tjehan 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  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

echoprint-codegen's Issues

song/identify response is empty

It seems I could not get proper fingerprints. None of the fingerprints I produced using codegen did return a proper response.

I'm using this code on Ubuntu.

$ ./echoprint-codegen ~/Desktop/Rammstein\ -\ Ich\ Will.mp3 10 20 > rams_data

$ cat rams_data
[
{"metadata":{"artist":"Rammstein", "release":"Greatest Hits", "title":"Ich Will", "genre":"", "bitrate":320,"sample_rate":44100, "duration":216, "filename":"/home/ahter/Desktop/Rammstein - Ich Will.mp3", "samples_decoded":220598, "given_duration":20, "start_offset":10, "version":4.12, "codegen_time":0.057185, "decode_time":0.270312}, "code_count":546, "code":"eJzVVl2uNKcO3BI2NpjlGLD3v4RbzYm-VkYK52EU6ealZtSA8U-5TCm0S7lAjgsw0w16vcFYF6jUblDzBs1uMMcF_j-zwUsv8EuuWr_BNRtS_AJf5UrmDb7JVcQFvuLVNVc1-AL_yVzds3GNV2q9ga4L_JYruwAz3-C_yLpv8uz7Bosu8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vCxGQy40pJcJiUbcgyd4sHDtArGQCs5KM7j1RMLpWAlz-Lk1aQ8vKmgyN8EIwKTZdaXBABjKrepWNszBrms9WuOt1wluiTxMo4nbwOkBnwRJTOTLQGvwBq2qqHQXqC1jA0Vm0tiIBm-q1ocwZMD7T1h9DpQXWe9QSt_H6OqN6-vzI2MV11B36BC1JUsbxrt5ZbSeQCxaawj62bIwrEhQSUwWEBnHMTMMvfSC6h708e2FIRjSBY2qohjJVcGQiI3MTyXHhp5IVdEJEpa9QERuHlpa6EQBWcAZ-NnWhnihcxB_KY0CI_ix90wLdBQJlCYVLwJIKXizJJh8odllnzuKgwLHF2ttlo_Vc4djfD6zS_WsnsvhSEDrSQOVROM95o-pc-JcXp4GPxENaFfOR7gSAgSB1lYxgNfIHLu3yktOIh5OrxrgY9m4itAMBSN2Qi0LZl5CqyEgDNFHyTLbxDQAR05KwCzB_MhV0CktG1oZYRlm9OPz8ao9tIPO49mMCMvAtIkTzMnfCaHJrO2FE8fHtxdAd6lGpSuUlpAzxdxCampYGSj9kO3oYdQIcdpmGfARTxw2hJgohvOY4pjej3dIWLVYCZqDXcjjhoDjnRRonkyU44gn4mXcBlFEhE_HYr2rP7IHdXiKg9f3qlusozcWGghFVCnWFOEFpF0j-pOGUVz2o_NJeEqC6AvPMB5Da8dD6pxYeJ_A3T1GJ5_dnrRKoGwVfPWYjDlEgQ572tqhTfVsNjOtSwdk4w9gseTHtxf-B2pASUo=", "tag":0}
]

Query like this:

$ curl -F "query=@rams_data" http://developer.echonest.com/api/v4/song/identify?api_key=MY_KEY
{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "songs": []}}

So far I tried this for a lot of songs. This example from an mp3 taken from issue #40. The problem is when I use your fp code(post_string) from the site for billie jean, everything works fine. But I could not get anything but empty response from all other mp3s.

$ cat post_string
{"code":"eJxVlIuNwzAMQ1fxCDL133-xo1rnGqNAEcWy_ERa2aKeZmW9ustWVYrXrl5bthn_laFkzguNWpklEmoTB74JKYZSPlbJ0sy9fQrsrbEaO9W3bsbaWOoK7IhkHFaf_ag2d75oOQSZczbz5CKA7XgTIBIXASvFi0A3W8pMUZ7FZTWTVbujCcADlQ_f_WbdRNJ2vDUwSF0EZmFvAku_CVy440fgiIvArWZZWoJ7GWd-CVTYC5FCFI8GQdECdROE20UQfLoIUmhLC7IiByF1gzbAs3tsSKctyC76MPJlHRsZ5qhSQhu_CJFcKtW4EMrHSIrpTGLFqsdItj1H9JYHQYN7W2nkC6GDPjZTAzL9dx0fS4M1FoROHh9YhLHWdRchQSd_CLTpOHkQQP3xQsA2-sLOUD7CzxU0GmHVdIxh46Oide0NrNEmjghG44Ax_k2AoDHsiV6WsiD6OFm8y-0Lyt8haDBBzeMlAnTuuGYIB4WA2lEPAWbdeOabgFN6TQMs6ctLA5fHyKMBB0veGrjPfP00IAlWNm9n7hEh5PiYYBGKQDP-x4F0CL8HkhoQnRWN997JyEpnHFR7EhLPQMZmgXS68hsHktEVErranvSSR2VwfJhQCnkuwhBUcINNY-xu1pmw3PmBqU9-8xu0kiF1ngOa8vwBSSzzNw=="}

When I post this I get the same result as the given url in the documentation.

$ curl -F "query=@post_string" http://developer.echonest.com/api/v4/song/identify?api_key=PTELLTDHNE6QEG42C
{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "songs": [{"score": 54, "title": "Billie Jean", "message": "OK (match type 5)", "artist_id": "ARXPPEY1187FB51DF4", "artist_name": "Michael Jackson", "id": "SODJXOA1313438FB61"}]}}

Clarify echoprint license

In the LICENSE file, it says that echoprint-codegen is under the MIT license. However, each individual file says that all files are "all rights reserved". Can you clarify what the license status of the Echoprint files are?

Unsupported compiler 'GCC 4.2' selected for architecture 'armv7'

If you try to build this in XCode 5 you will get some error "Unsupported compiler 'GCC 4.2' selected for architecture 'armv7'"

You can get around that error by modifying the compiler in the project's build settings but I haven't gotten farther past the errors that occur after that.

Empty codes with -s

from regomodo:

The output of the command you suggest is here.

note the empty codes and the insanely long qtimes. the machine has 1GB ram and is a 1.6Ghz proc. maybe some swapping is happening?

Songs response is empty

I'm trying to test echoprint and wondering if I'm doing something wrong:

./echoprint-codegen ~/medialibrary/Sounds/Music/The\ Beatles\ -\ Yesterday\ \(1965\).mp3 > post_data

post_data file:

[
{"metadata":{"artist":"The Beatles", "release":"GOLD Collection (Novartis Vers", "title":"Yesterday (1965)", "genre":"Rock", "bitrate":192,"sample_rate":44100, "duration":127, "filename":"/home/vanya/medialibrary/Sounds/Music/The Beatles - Yesterday (1965).mp3", "samples_decoded":1400822, "given_duration":0, "start_offset":0, "version":4.12, "codegen_time":0.351157, "decode_time":0.976557}, "code_count":2970, "code":"eJzFnWmSHDlyha-EfTkO1vsfQd-LlomjNoPnD5pMHJtHsliVGQG4vwVAZDvnfHEGxGNBTRaMacF1BvhaLVjbgJCWBbVZsKIBsVwLerdgbwOSXuANbVswowFZ0_iG2AwovluQrwWaqDeMY8FaBtRYLMjOgp4MaKVZULsFs1lwogG9FQvmMmCEasG4FqxpwHTZgnYs4MresDQXb5jHgpMM2KFZ0LMF0xtwRGlvGMECDecTbooWjGbBrm_wdLEFbVlwhgHeJwu4bgPKsOBcAwLj9YYILRnQpgW3GJCcAbxztuCHSi4LrjfAt2iBKO0N6xjwQ0NvNCC6akGOFvyVhgYLRjUgx2lBuhYUb0Ez4TQDSh4W_JXCTgNqzAY0Dckbsgm1WWCrpAzLG_TmT_ihknFZkE2oxQJbYW0NlcN-whLxvCE6C1K1YBcDNm9gQOgWmPp7REtv2M2Am5IFaog39PsGL84ywNZQaOkNHnEwIHoLrjMgpGABZtYA6OENkQIxoDULVn7DLw1twYIfGmomzR4t0Au84Q4DbA2Nevc31GhB9wYk2YM3KNi9wdZQtekbZjEgx26BBuwJJZlg6-COBtSYLMCQvqGJAd5QlwW20qk43xCjBalZMIcBIxQLIA8DZCvesLMF5xgwq7egXQNWqRaYSVP1YUCvFqxhwQkGnLIsmNsCZb8n_EqaJtz7BhRpWGCr5KgG_FDJYELuFlxvQIC03hD9tkC39YbZDfirp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4MGRPp-KuTnp_WxYEX9JJ4XZ1Jichd0QThEynx5bOioWjfXJ0KqhRcJpFz2GhQet-TxdNOQeuXv9dI8a-Kv7iYUgIOhBOs2lepz5rTc8H-UWPLiYBJ_M9daBYz5U1mTyoiyLTwiOS7nCmXBjMgcugC7BMXXse-Ak3dCD9O-QScCSoHIM_qCDuaDvaG8nWYuD1WsImHx8dpqi4KD0ZQ-ccPR6BYefWIHAEeTmd0tA5WEiuZ8LFF7GhPmqgOcy8DkPp-XEqEwrFFCK2JVLpyIusbqIBYWlZ4qsVS6fBWd-HXOjxKx3JohAH8RmZhEWRPcpvdJ266F3z7r5t_W_DGjOBbpSmNTOoGItADuxFx310pDoULWZx2VqAKwyKtLpIV5L2zCKeaOr82GpZCyTEw7N0qpsBIwDpOKQW-Rsxu6pBkgqpKpEyyMzN1CpTVIZrfmvz5-iMd9c2zfd2R-fsUI8GSTg9sBJpFTIffbR0RHDzBntpLwy1ztrhYvx30yIRKVNrGLgH0pjO5rWj45G3f_wCMX2PTSDVWnaVcdg6FLMljzqolcLHUlrBlbwsZS7oPUzZASca0DEuiFtn-AFc0z_1VsqhUuA2z33TTBRg14LfkJzW_SXOQP5G1OTy4aRI2L5EUsamXj0UI1epXezd5VqcUsnRoXxtdE5d0HBYT1pIRJemXFb6niGCvikqrTtldzuSG7Mibuo4cClv8lULx1Bv1HEAeJtcHtFXxu_yXvgx7ZXyHql9tRt0_KnC7GgN1gbnQAyiDds3kslHnQnSEY12dLZ99qVnZwbNl_UQ2NL5QLFu-gpOyg8nkHuJFNRtltGkU_VcBwlzfNe8oL32B3aA6f_1tT_wX7TRixs=", "tag":0}
]

Making request:

curl -F "query=@post_string" http://developer.echonest.com/api/v4/song/identify?api_key=MY_API_KEY

Response:

{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "songs": []}}

What does it mean? The song is missing in DB?

Error using python script

When run the lookup.py script I see such error:

File "./lookup.py", line 11, in
import pyechonest.config as config
ImportError: No module named pyechonest.config

What I did wrong?

endianness of murmurhash

from ashwin:

MurmurHash2 used gives different results on big endian and little endian machines. Looks like if this is fixed, it might break codegen backward compatibility? Could someone explain if this was by design or a bug? How will the matching work if the codes are different?
Edit Fingerprint.css, replace MurmurHash2 with:

//-----------------------------------------------------------------------------
// MurmurHashNeutral2, by Austin Appleby

// Same as MurmurHash2, but endian- and alignment-neutral.
// Half the speed though, alas.

unsigned int MurmurHash2 ( const void * key, int len, unsigned int seed )
{
    const unsigned int m = 0x5bd1e995;
    const int r = 24;

    unsigned int h = seed ^ len;

    const unsigned char * data = (const unsigned char *)key;

    while(len >= 4)
    {
        unsigned int k;

        k  = data[0];
        k |= data[1] << 8;
        k |= data[2] << 16;
        k |= data[3] << 24;

        k *= m; 
        k ^= k >> r; 
        k *= m;

        h *= m;
        h ^= k;

        data += 4;
        len -= 4;
    }

    switch(len)
    {
    case 3: h ^= data[2] << 16;
    case 2: h ^= data[1] << 8;
    case 1: h ^= data[0];
            h *= m;
    };

    h ^= h >> 13;
    h *= m;
    h ^= h >> 15;

    return h;
} 

Looks like it is the same on little endian machines:

int main()
{
  char a[100];
  printf("%d, %d\n", MurmurHash2(a, sizeof(a), 2323), MurmurHashNeutral2(a, sizeof(a), 2323));
}
Output:
-330669574, -330669574

Machine used was 64bit Intel.

Tweaking codegen

Hi,

Recently I have been playing around with codegen and its parameters. I have changed deathtime and ttarg values and also decaying speed. I have managed to improve echoprint accuracy radically by decreasing ttarg value. However, I still seem to have poor accuracy for tracks like classic music or soundtracks (orchestrated music). For most of those tracks, there is a monotonic background instrument. I was wondering how this could be improved?

  1. Do you think that by increasing number of bands (above 5kHz) does make any sense?
  2. Could whitening filter be an issue here (e.g. for monotonic background instrument)?
  3. Do you have any other ideas?

Regards,
Karol

Unable to compile on Mac OS X 10.6.8

I'm unable to compile codegen on Mac OS X 10.6.8 using Boost 1.46, TagLib 1.7 & ffmpeg 0.6.3

I get the following error running the make command:

g++ -Wall -I/usr/local/include/boost-1_35 `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o AudioBufferInput.o AudioBufferInput.cxx
g++ -Wall -I/usr/local/include/boost-1_35 `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o AudioStreamInput.o AudioStreamInput.cxx
g++ -Wall -I/usr/local/include/boost-1_35 `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Base64.o Base64.cxx
g++ -Wall -I/usr/local/include/boost-1_35 `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Codegen.o Codegen.cxx
In file included from SubbandAnalysis.h:11,
                 from Codegen.h:18,
                 from Codegen.cxx:10:
MatrixUtility.h:12:43: error: boost/numeric/ublas/matrix.hpp: No such file or directory
MatrixUtility.h:13:48: error: boost/numeric/ublas/matrix_proxy.hpp: No such file or directory
In file included from SubbandAnalysis.h:11,
                 from Codegen.h:18,
                 from Codegen.cxx:10:
MatrixUtility.h:15: error: ‘boost’ has not been declared
MatrixUtility.h:15: error: ‘ublas’ is not a namespace-name
MatrixUtility.h:15: error: expected namespace-name before ‘;’ token
MatrixUtility.h:17: error: ‘ublas’ has not been declared
MatrixUtility.h:17: error: expected initializer before ‘<’ token
MatrixUtility.h:18: error: ‘ublas’ has not been declared
MatrixUtility.h:18: error: expected initializer before ‘<’ token
MatrixUtility.h:20: error: ‘ublas’ has not been declared
MatrixUtility.h:20: error: expected initializer before ‘<’ token
MatrixUtility.h:21: error: ‘ublas’ has not been declared
MatrixUtility.h:21: error: expected initializer before ‘<’ token
MatrixUtility.h:22: error: ‘ublas’ has not been declared
MatrixUtility.h:22: error: expected initializer before ‘<’ token
MatrixUtility.h:23: error: ‘ublas’ has not been declared
MatrixUtility.h:23: error: expected initializer before ‘<’ token
MatrixUtility.h:26: error: ‘MatrixUtility::rows’ declared as an ‘inline’ variable
MatrixUtility.h:26: error: ‘matrix_f’ was not declared in this scope
MatrixUtility.h:26: error: expected ‘,’ or ‘;’ before ‘{’ token
MatrixUtility.h:27: error: ‘MatrixUtility::cols’ declared as an ‘inline’ variable
MatrixUtility.h:27: error: ‘matrix_f’ was not declared in this scope
MatrixUtility.h:27: error: expected ‘,’ or ‘;’ before ‘{’ token
MatrixUtility.h:28: error: expected ‘,’ or ‘...’ before ‘&’ token
MatrixUtility.h:28: error: ISO C++ forbids declaration of ‘matrix_f’ with no type
MatrixUtility.h:29: error: expected ‘,’ or ‘...’ before ‘&’ token
MatrixUtility.h:29: error: ISO C++ forbids declaration of ‘matrix_f’ with no type
MatrixUtility.h:30: error: variable or field ‘clear’ declared void
MatrixUtility.h:30: error: ‘matrix_f’ was not declared in this scope
In file included from Codegen.h:18,
                 from Codegen.cxx:10:
SubbandAnalysis.h:51: error: ISO C++ forbids declaration of ‘matrix_f’ with no type
SubbandAnalysis.h:51: error: expected ‘;’ before ‘&’ token
SubbandAnalysis.h:53: error: expected `;' before ‘protected’
SubbandAnalysis.h:57: error: ‘matrix_f’ does not name a type
SubbandAnalysis.h:58: error: ‘matrix_f’ does not name a type
SubbandAnalysis.h:59: error: ‘matrix_f’ does not name a type
In file included from Codegen.h:19,
                 from Codegen.cxx:10:
Fingerprint.h:37: error: ‘matrix_u’ has not been declared
Codegen.cxx: In constructor ‘Codegen::Codegen(const float*, uint, int)’:
Codegen.cxx:20: error: ‘runtime_error’ is not a member of ‘std’
make: *** [Codegen.o] Error 1

Any suggestions about fixing this?

nullptr_t

Use of undefined identifier 'nullptr_t';

Suggestion: Move to Boost iOS Framework

I struggled with making Boost compile and work with XCode 5 + iOS 7.

However, when I used the Boost iOS Universal Framework(https://github.com/FWKamil/boost-ios) I was able to get it building and compiling properly.

This is a much easier way to make this library. Just drag and drop their .framework into your project and it builds. You also have to update the compiler settings switch (under build settings) to LLVM 5.0. It built right away for me with no issues.

Also, remove references to any prior Boost libraries in build settings.

Codegen Fail Compiled

Hello dear friends Echoprint.
We fail to compile codegen.
We need compiled codegen could send it?.
We await your response.
thank you very much

makefile compilation error for Metadata.cxx

Running on Mac Mountain Lion.

Getting the following errors when trying to 'make' the Makefile. I have already adjusted correct path to include Boost:

g++ -Wall -I/opt/local/include -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Metadata.o Metadata.cxx
Metadata.cxx:8:21: error: fileref.h: No such file or directory
Metadata.cxx:9:17: error: tag.h: No such file or directory
Metadata.cxx: In constructor ‘Metadata::Metadata(const std::string&)’:
Metadata.cxx:15: error: ‘TagLib’ has not been declared
Metadata.cxx:15: error: expected `;' before ‘f’
Metadata.cxx:17: error: ‘TagLib’ has not been declared
Metadata.cxx:17: error: ‘tag’ was not declared in this scope
Metadata.cxx:17: error: ‘f’ was not declared in this scope
Metadata.cxx:25: error: ‘TagLib’ has not been declared
Metadata.cxx:25: error: ‘properties’ was not declared in this scope
make: *** [Metadata.o] Error 1

Missing files fileref.h and tag.h. Are these meant to be a part of Boost? Or am I missing something completely?

problem with wav files converted from mp3 with audacity

Is there anyone else that is experience this issue?
I have a list of mp3 files and a list a wav files, both list contain the same songs. The identification work perfectly when I use the mp3 file but no one of them are recognized when I use the wav version. :(

figure out taglib windows files, taglib itself

there are a few .h files that windows people "need" to compile codegen but if they have taglib installed already they won't need them. either get rid of them (forcing people to have taglib compiled), get rid of taglib (move a tagger to python via eyeD3 or kaa) or figure out which files are exactly needed.

codegen.exe requires MSVCP110.dll

I compiled codegen.exe by following instructions. When I run it on a machine on which I compiled it, it works. However, on another computer I get the error that msvcp110.dll is not found. What needs to be installed on the machine for this error not to appear ? I used Visual Studio 2012 to compile codegen.exe

No songs in response on Lion

I'm using this code on OS X on Lion (Mac OS X 10.7).

I put it in post_data:

$ echoprint-codegen Billie-Jean.mp3 10 20 > post_data

[
{"metadata":{"artist":"", "release":"", "title":"", "genre":"", "bitrate":128,"sample_rate":44100, "duration":294, "filename":"Billie-Jean.mp3", "samples_decoded":220598, "given_duration":20, "start_offset":10, "version":4.12, "codegen_time":0.088343, "decode_time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cjv2ruvUOy2KLbEamTzggSGxUK0IgmgwJP71jj3EUSuRb78BmeH2ZewDeLMpNFkGwu2u8_ggGtalqOsLDo3eYxBMhiG_2OdXr21vaA9AOtdeTjAVb4Q1Iv2Ng--rJvrGBSVORBZBk7aj0Nob4kWPBKtQ-JSiTzvlrFlH7UGfgg5IGp4DasHx1o0WIlAQFvT2ORdJlkiO7gn6T0NZJdFGBx8aMI54oVFuhvfUDhOFJ07UMqTxoo0E9HvaYDx1dIYA0dOCvz4G4cTT9J0iC8O4sxOE9o3Uk3ISijcc5R6E5G7jA6Ux1y9jH_gHMV5j_Q==", "tag":0}
]

Sent it with my key:

$ curl -F "query=@post_data" http://developer.echonest.com/api/v4/song/identify?api_key=YOUR-API-KEY

And get this response:

$ {"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "songs": []}}

I hope it isn't a Lion thing. And ffmpeg works but truncates somewhere. The .wav sounds good.

ffmpeg -b:a 64k -i Billie-Jean.mp3 Billie-Jean.wav

(...)

Output #0, wav, to 'Billie-Jean.wav':
Metadata:
encoded_by      : Lavf52.16.0
encoder         : Lavf53.32.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 -> pcm_s16le)
Press [q] to stop, [?] for help
Truncating packet of size 1024 to 836ate=1410.7kbits/s    
Truncating packet of size 1024 to 1
size=   50724kB time=00:04:54.45 bitrate=1411.2kbits/s    
video:0kB audio:50724kB global headers:0kB muxing overhead 0.000089%

I'm using this song: http://dl.dropbox.com/u/4080869/Billie-Jean.mp3
I don't know how to give you more details.

Can you help?

No matches when song is in DB

I've whipped up a little test program that creates a fingerprint from the 1st 20seconds and retrieves tags from the echonest api in Python.

What i've found is that either the codegen or echonest to be a little buggy; Daft Punk fingerprints come back with some very unusual results despite the files being identified by taglib (python-mutagen) and play correctly .

What to do with a codestring?

Please, explain to uninitiated. What to do with codestring then? Must I only send it to server, or I can use it locally, for comparing two sound pieces?

Add git tags for newer versions

It looks like there's a 4.12, but no corresponding git tag. Can we get some git tags, to make it easier to package this software? Thanks.

taglib doesn't do threading

Only the latest git for taglib does multithreading properly. We should disable it on -s to reduce the chance of errors.

Recognition accuracy when "listening" to recorded samples.

I made a simple website based on my red5 media server installation with flash audio recorder of client's microphone as a frontend and started to perform some tests.

On youtube we have a Red Hot Chilli Peppers song, which was really kind of popular back in the days and I think it got it's notorious music sign - it should be generally well known.

I tried to recognize the full FLV file from Youtube and I got some awesome results:

./lookup.py rhcp-youtube-all.flv

Got result: [<song -  By The Way>]
Artist: Red Hot Chili Peppers (ARE8GLF1187FB52532)
Song:  By The Way (SOVTWDI12A67020460)

This looks great, so I tried to record the same song (full as well) from my online flash recorder and let the resulting sound be recognized with Echoprint again:

./lookup.py rhcp-recorded-all.flv

Got result: []
No match. This track may not be in the database yet.

Snap.. Maybe the quality isn't sufficient enough? Well, I turned on Audacity and compared the frequency amplitudes. Here we have a picture of these two songs. I think there are similarities and patterns visible just with an eye.

RHCP - original

RHCP - original

RHCP - recorded

RHCP - recorded

So my issue - how is it that the accuracy isn't so accurate? Or how accurate echoprint actually is?

make install

Should be able to install so people don't need to set up paths, and so that linking an app against -lcodegen works

Segmentation fault with echoprint-codegen and python

I'm using the example code generator echoprint-codegen on Ubuntu 13.04 through the lookup.py python script distributed with echoprint-server.

Actually I'm cycling on a list of mp3 files and sometimes the echoprint-codegen gives segmentation fault. Then I restart the script from the mp3 file "causing" the problem and it works (so presumably this doesn't depend on the mp3 format file).

Any other faced reason for segmentation fault?

thanks in advance
Lorenza

Missing "title" tag in json created with echoprint-codegen

Hi all
I'm using the example code generator echoprint-codegen on Ubuntu 13.04 passing it a list of mp3 files

./echoprint-codegen -s < music_to_ingest > all_codes.json

I've noticed that for some mp3 files the json generated doesn't report any information about the title (title is an empty string).
All the mp3 files have a track title (I have created them with Audacity and verified with a set o tools).

Anyone facing such issue?

Thanks
Lorenza

Move LDFLAGS after the main object

When trying to compile on Ubuntu I get the following output:

main.o: In function main:
main.cxx:(.text.startup+0x293): undefined reference to pthread_create
main.cxx:(.text.startup+0x3b4): undefined reference to pthread_creat'
collect2: error: ld returned 1 exit status

The for the bug is that the $(LDFLAGS) are before main.o in the MakeFile.

Does it work offline?

Hi;

Is it possible to analyze a movie's song, and save the data in a mobile app, then recognize which second is the currently playing video at? Can I do this with echoprint?

alternative front-end that processes remote rather than local files

I have a use case where the files to be fingerprinted are not local
and it it would be ideal to be able to pipe the minimum number of
bytes from the remote files to the fingerprinter to do its work. In
looking at the code,
I'm imaging an alternative set of wrapper classes to main and
AudioStreamInput that would be passed a set of url rather than a set
of local files and would invoke ffmpeg passing it a stream rather than
a file as input.

change expected sample rate to 8kHz?

I have a novel use case, involving matching speech-heavy audio (specifically political advertisements). I'm experiencing low accuracy on matching in my implementation (<40% accuracy from best_match_for_query). Based on my (admittedly limited) understanding of the codegen process, I'm wondering if using a lower sample rate would help. Based on my experience with speech signal processing, I'm thinking that it may help to begin with a signal that is sampled at 8khz.

how much tweaking would it take to change this?

Segmentation fault when duration set

Using the latest HEAD:

$ ./echoprint-codegen preview.mp3 -s 10 20
Segmentation fault (core dumped)

It works fine without specifying any duration, on the same file, e.g.

$ ./echoprint-codegen preview.mp3 -s 10

Or when specifying a duration < 1 (which doesn't make much sense, I am guessing) e.g.

$ ./echoprint-codegen preview.mp3 -s 10 0.1

It looks like the segfault originates from line 135 of main.cxx:

    sprintf(output,"{\"error\":\"could not decode\", \"tag\":%d, \"metadata\":{\"filename\":\"%s\"}}",
        tag,
        escape(filename).c_str());

which implies that numSamples < -1, which means that the audio wasn't successfully decoded in that particular case.

Digging a bit more into that in gdb, it looks like, in that particular case, the ffmpeg command line never actually gets executed - and indeed, File::Exists(filename) returns false... and filename is empty. The cause of that filename being empty seems to be that the 'already' int in main.cxx is set to argv[4](which seems a bit odd).

The root of the problem seems to be that main.cxx is picking arguments in the wrong place in argv, and the following patch seems to fix it:

https://gist.github.com/3005431

feeder mode

something should take samples as they come in and output codes as they come out-- will be needed for iOS

lookup.py

I have installed and tested everything (I think) ffmpeg, pyechonest, etc. Codegen.exe works as stand-alone and returns a code string. When I run lookup.py, I get an error:

File "lookup.py", line 22, in lookup
if len(fp) and "code" in fp[0]:
TypeError: object of type 'NoneType' has no len()

Any ideas?

Calling 'echoprint-codegen' from PHP Script

I've been playing around with the codegen program locally on my machine today and yesterday. I was just experimenting by creating a PHP app that calls codegen. It took the longest time figuring out why PHP would recognize the 'echoprint-codegen' program, but if I ran 'echoprint-codegen' from terminal it would work just.

I finally was able to make the php script recognize it work by giving it an exact path to the program, something like the following:

<?php

echo shell_exec('/usr/local/bin/echoprint-codegen /Users/MyUser/Music/iTunes/iTunes\ Music/AlbumName/SongName.m4a 10 30');

?>

However, I keep getting the following error:

[ {"error":"could not decode", "tag":0, "metadata":{"filename":"/Users/MyUser/Music/iTunes/iTunes Music/AlbumName/SongName.m4a"}} ]

But if I run it from terminal, it works just fine and returns the metadata and generated code as you would expect. Any ideas?

Thanks,
Chad

Can you decorate members with 'extern "C"' for .NET usage ?

(Sorry but that's the only place where I could post this message.)

Have little C++ knowledge but I need to use codegen from C#, currently working on a app. that will be on the web, for free.
I tried to change "#define CODEGEN_API _declspec(dllexport)" to "extern "C" _decl .....), removed that from the main class since I really only need to call "codegen_file" and because of the inability to access C++ classes from non-C++ languages.

So here's the problem now : It does work but it displays a console each time I call the DLL.

Can you provide some directions on how to achieve this ?

Thanks a lot.

"error":"could not decode"

I keep getting the error message "error":"could not decode" upon running echoprint-codegen against different mp3 files.

Change ttarg and whatelse?

Hi all
I'm making some tests with echoprint codegen for detecting advertisements on audio and video broadcasting. Even if advertisements are very short (6 to 30 secs) it works quite well.
It works well even with some bumpers that are even shorter (3-5 secs).
How can I try increasing the precision even in this case? The problem seems not being only the duration rather the actual content of the signal...

Thanks in advance for any suggestion
Lorenza

audit boost usage, either replace or include needed libs

boost is huge and heavy and i think we now only use a few .h files that do array bounds checking, which we disable. this is due to the lineage of codegen and it may be useful to just replace our boost usage with our own array class.

Error during make. Is boost required?

I followed installation instructions. But experienced problems during compilation:
g++ -Wall -I/usr/local/include/boost-1_35 taglib-config --cflags -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Codegen.o Codegen.cxx
/bin/sh: taglib-config: not found
In file included from SubbandAnalysis.h:11:0,
from Codegen.h:18,
from Codegen.cxx:10:
MatrixUtility.h:12:43: fatal error: boost/numeric/ublas/matrix.hpp: No such file or directory
compilation terminated.
make: *** [Codegen.o] Ошибка 1

As a solution I propose to supply boost as a git submodule

Windows compilation instructions updates

Following the Windows instructions here…
https://github.com/echonest/echoprint-codegen/tree/master/windows

"Download zlib: http://zlib.net/zlib125.zip" - this file now 404s. The latest version is:
http://zlib.net/zlib-1.2.7.tar.gz

I'm also getting an error when compiling codegen:
1>LINK : fatal error LNK1181: cannot open input file 'zlib.lib'

No file by that name is included in the latest zlib installation:

Additionally, there are now pre-compiled DLLs available here, this may be a simpler solution:
http://www.winimage.com/zLibDll/index.html
http://www.winimage.com/zLibDll/zlib125dll.zip

need a workable pcm raw file for Codegen class

Is it possible to put a workable pcm raw file (mono, 11025Hz, 32-bits float or 16-bit signed) in the release as a sample? The reason I suggest it is because I met some problem when running Codegen in Win7/VS2005 and a proven workable sample pcm raw file woule be help.

I successfully built the codegen in VS2005 (Win7, Boost 1.46.1). But none of my MP3 files can generate the finger-print code successfully using Codegen->getCodeString(). The Codegen->getCodeString() always retuens null and the Codegen->numOfCodes() is always 0. I dont think problem is in ffmpeg codec or taglib because even I feed the pcm raw data into codegen library, the result is still same.

I tried to feed 30sec, mono-channel, 32-bits float pcm raw data buffer into Codegen() constructor directly. I also tried to feed 30 sec, mono-channel, 16-bits signed raw data file into AudioBufferInput->ProcessRawFile( filename ) then use AudioBufferInput to initialize Codegen() object, but none of then can get fingerprint code other than null string.

Here is the only change I made in source code in order to build Codegen on VS2005.

(1) Because VS compiler does not allow code to allocate an array with non-constant variable, I changed the line#66 in Fingerprint.cxx from:
int nsm = 8;
float ham[nsm];

To:
int nsm = 8;
float ham[8];

(2) I also wrote a inline rint() function in Fingerprint.cxx since rint() is not supportd in VS2005.

inline static long rint(double x) {
if(x >= 0) return (long)(x + 0.5);
else
return (long)(x - 0.5);
}

Except these two, I didn't change the code in Codegen, SubbandAnalysis and Codegen.

Codegen Segmentation fault

I am trying to process a few hundred mp3 files using the command

echoprint-codegen -s < file_list > codes

However, I get a segmentation fault every time after about 115 s
(corresponding to about 53 processed tracks).

Five consecutive runs generated the following errors:
50882 Segmentation fault
49232 Segmentation fault
51034 Segmentation fault at 54th track
51408 Segmentation fault at 53rd track

echoprint-codegen(51205,0x7fff70184cc0) malloc: *** error for object
0x100837a00: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
51205 Abort trap

I am running OS X 10.6.8 on a 2GHz Intel Core 2 Duo with 3GB, 667 MHz
DDR2 SDRAM.

Best Wishes,
Per Q A

Access violation occurs when calling from C++/CLI

I've posted the following on StackOverflow and because I'm not sure I'm actually passing in the right values as parameters I am cross posting here (apologies). http://stackoverflow.com/questions/10249237/c-cli-noob-system-accessviolationexception

The entire source for what I'm trying to do is here: https://github.com/developmentalmadness/echoprint-net/tree/3c48d3783136188bfa213d3e9fd1ebea0f151bed

I'm assuming the samples parameter in the Codegen ctor is the number of elements in the buffer. Also, the buffer's source is actually an array of bytes not floats. It's the raw data coming from the microphone and I'm just converting it from an array of bytes to floats.

Filenames with double quotes broken

There seems to be no way I can get echoprint-codegen to accept filenames with double quotes. I tried single quoting the filename as suggested in #41 but to no avail:

// ls works fine on the file
$ ls myfile\"hello\".flac 
myfile"hello".flac

// but echoprint-codegen fails
$ echoprint-codegen myfile\"hello\".flac 
[
{"error":"could not decode", "tag":0, "metadata":{"filename":"myfile\"hello\".flac"}}
]

// single quoting the filename fails as well
$ echoprint-codegen 'myfile"hello".flac' 
[
{"error":"could not decode", "tag":0, "metadata":{"filename":"myfile\"hello\".flac"}}
]

// just to show that echoprint-codegen works fine if the file has no double quotes
$ echoprint-codegen myfile.flac 
[
{"metadata":{"artist":"El Tri", "release":"No podemos volar", "title":"En el ultimo trago (dueto con Alberto Angel \"El Cuervo\")", "genre":"Latin", "bitrate":977,"sample_rate":44100, "duration":280, "filename":"myfile.flac", "samples_decoded":3090665, "given_duration":0, "start_offset":0, "version":4.12, "codegen_time":0.870392, "decode_time":1.150806}, "code_count":6930, "code":"eJzVvVuS.........

Tested using Terminal in Mac OS X 10.7.5

Tag a new release

We're currently packaging this in Homebrew as a "HEAD-only formula"; it would help us out if you could git-tag a new stable release for us to point to.

Especially since there are OS X fixes since the last tagged commit.

Thanks!

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.