Forums: 

Hi!

 

I'm testing the musicid_stream and tried to search another song, besides the example of music:

Music: 01 - Back In Black.mp3

Size: 4,88 MB

Bit Rate: 160kbps

Samples Rate: 44100 Hz

Channels: 2

Duration: 04:02

Replace the path of ancient music for this and does not work! Does not work! What do I do?

Hi Renan,A couple of ideas:1) GNSDK as such does not support compressed audio files such as MP3. Try decoding the file to WAV using ffmpeg or other tool first, then passing it to GNSDK.2) If you are trying to recognize a full-length MP3 file, you would be better off using musicid_file, and not musicid_stream. musicid_stream is for recognizing "noisy" recordings of audio, such as from a mobile device.Let us know if this helps!

Thank you for the reply!But, I can use the musicid_file to recognize an MP3/WAV file?I have the following case: the User will enter the file path and the program will recognize the MP3. In this case I will still need to convert the file to WAV? Even using the musicid_file?If need, I can do this conversion by GNSDK?

Hi,Even when using musicid_file, you would need to decode MP3 to WAV - GNSDK does not provide this utility. You can use something like FFMPEG which is really easy.

Ok.I will do the conversion, reuse the example of GNSDK and return to give feedback, thanks

Well, here we go:

  1. Gnsdk_musicidfile_query_fileinfo_create I'm using to create the query. But I did not understand what I have to pass as a parameter in ident_str which is a gnsdk_cstr_t. I'm passing a string test;
  2. Use the gnsdk_musicidfile_fileinfo_fingerprint to begin, write and finish;
  3. Use the gnsdk_musicidfile_fileinfo_get_response_gdo to return the file information, but it returns me the error:

code: 276955139;message: "No error".What am I doing wrong? 

Follows the code image,

hi Renan, It looks like you are missing a couple key API calls that perform the query:error = gnsdk_musicidfile_query_do_trackid(query_handle, GNSDK_MUSICIDFILE_QUERY_FLAG_DEFAULT);error = gnsdk_musicidfile_query_wait_for_complete(query_handle, GNSDK_MUSICIDFILE_TIMEOUT_INFINITE, &complete_error); Try inserting these before your call to get the response GDO. hope this helps!-john

Hi! Repeat the test. With the same music and the alterations suggested ... It worked!Now, how do I do to bring data from other music? Title, Track Number, Artist, Genre, Lyrics, Year, etc.I ran the query and so he returned me the name of the album. thanks,~Renan

Hi,I tried to use the example musicid_file_trackid, but it only returns me the album. I need the other metadata (title, track number, artist, genre, lyric, etc.). I can get this informations from music? thanks,-Renan

Forum Discussions