Forums » General Discussion Search

jEN - any example of uploading and analyzing. New Reply

Author Post
Posts: 3
Registered: Jun 29, 2011

Hi all! I would like to understand how to use com.echonest.api.v4.Track class so I can upload the sample of track and obtain title, artist... There are only tree examples on jEN official page and all of them without using the Track. Thank's a lot!

Posts: 1113
Registered: Sep 08, 2008

Ghedeon:

If you look in the EchoNestDevShell class and in the Track unittests you'll find examples of track upload. Here's the gist:

                        EchoNestAPI en = new EchoNestAPI();
                        Track track = en.uploadTrack(new File("music.mp3"), true);
                        track.waitForAnalysis(30000);
                        System.out.println("Tempo is "+ track.getAnalysis().getTempo());

Hope this helps

Paul

Posts: 3
Registered: Jun 29, 2011

Yes, it is exactly what I need!<br> Thank you, but I have a problem: when I try to analyze an original audio file, it is recognized fairly well, but whenever I record the same sound via a microphone into an mp3 and analyze it, it's not getting recognized. Is it the echonest that sensitive? The recording is in fairly good quality, no interference whatsoever.

Posts: 207
Registered: Sep 05, 2008

hi Ghedeon, the song recognition capability of track/analyze is based on ENFMP, which does not recognize songs "over the air" via microphone. you want to try echoprint: http://echoprint.me/

Posts: 1113
Registered: Sep 08, 2008

Ghedeon - if you are using track upload and analysis for primarily for over-the-air music identification, you'll have better luck using Echoprint. See echoprint.me for more details. We are still building full size fingerprint library, it is currently relatively small (about 150K tracks). This will be growing to > 10 million tracks in the next month or so. -- Paul

Posts: 3
Registered: Jun 29, 2011

Sounds good, but if I corectly undestand, there is no wrapper of EchoPrint for Java yet. The fact is that I've used jNE in my project for Android and it was pretty good for me, but without any java client library for EchoPrint it will be more difficult to do it. Anyway, thank you for help!

Posts: 10
Registered: Aug 11, 2012

I get a null pointer exception on doing it this way

Posts: 1113
Registered: Sep 08, 2008

kps123 - what does the stack trace say?

Reply to this Thread

You must log in to post a reply.