### Align Audio Files with Detailed Timing Analysis Source: http://www.ee.columbia.edu/~dpwe/resources/matlab/audfprint Use the -matchalign option to get a detailed match of timing offset and clock skew. For precise measurements, consider adjusting -hoptime and -timesize, and use -oversamp 1 to avoid deliberate file offsetting. ```bash audfprint -dbase fpdbase -match query.mp3 -density 15 -matchalign 1 ``` ```bash audfprint -dbase fpdbase -match query.mp3 -density 15 -matchalign 1 -alignoutdir alignout ``` -------------------------------- ### Interpreting Query Results Source: http://www.ee.columbia.edu/~dpwe/resources/matlab/audfprint Example output from a query operation. The 'matching-count' indicates the number of common aligned fingerprints; a higher number suggests a better match. 'match-time' reports the delay between the start of the reference item and the start of the aligned query. ```text Hash table read from fpdbase (13 tracks, 847 hashes) query.mp3 (5.8 s) analyzed to 80 hashes query.mp3 1 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/05-Full_Circle.mp3 2 0.070 matched 1 tracks (5.763 secs, 80 hashes, 13.8817 hashes/sec) in 0.4 sec = 0.077 x RT done Hash table read from fpdbase (13 tracks, 847 hashes) query.mp3 (5.8 s) analyzed to 208 hashes query.mp3 1 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/05-Full_Circle.mp3 8 0.070 matched 1 tracks (5.763 secs, 208 hashes, 36.0924 hashes/sec) in 0.2 sec = 0.038 x RT done ``` -------------------------------- ### Create Audio Fingerprint Database Source: http://www.ee.columbia.edu/~dpwe/resources/matlab/audfprint Use this command to initialize a new fingerprint database and add audio files from a list or a single URL. Options like -cleardbase and -matchonaddthresh can be specified during initialization. ```matlab audfprint -dbase fpdbase -cleardbase 1 -addlist reflist.txt ``` ```matlab audfprint -dbase fpdbase -matchonaddthresh 5 -add http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/01-Nine_Lives.mp3 ``` -------------------------------- ### Query Audio Database Source: http://www.ee.columbia.edu/~dpwe/resources/matlab/audfprint Use this command to match a query soundfile against an existing database. The output provides details on the top matches, including file paths, matching counts, and match times. ```bash audfprint -dbase fpdbase -match query.mp3 ``` ```bash audfprint -dbase fpdbase -match query.mp3 -density 15 ``` -------------------------------- ### Audio Fingerprint Database Creation Output Source: http://www.ee.columbia.edu/~dpwe/resources/matlab/audfprint This output shows the process of adding audio files to the database, including the number of hashes generated and the time taken. It also indicates when tracks are skipped because they already exist in the database. ```text Target density = 7 hashes/sec 01-Apr-2014 23:09:05 Adding #1 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/01-Nine_Lives.mp3...10.0 s, 58 hashes 01-Apr-2014 23:09:06 Adding #2 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/02-Falling_In_Love.mp3...10.0 s, 75 hashes 01-Apr-2014 23:09:06 Adding #3 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/03-Hole_In_My_Soul.mp3...10.0 s, 69 hashes 01-Apr-2014 23:09:06 Adding #4 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/04-Taste_Of_India.mp3...10.0 s, 77 hashes 01-Apr-2014 23:09:06 Adding #5 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/05-Full_Circle.mp3...10.0 s, 48 hashes 01-Apr-2014 23:09:07 Adding #6 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/06-Something_s_Gotta_Give.mp3...10.0 s, 44 hashes 01-Apr-2014 23:09:07 Adding #7 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/07-Ain_t_That_A_Bitch.mp3...10.0 s, 73 hashes 01-Apr-2014 23:09:07 Adding #8 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/08-The_Farm.mp3...10.0 s, 60 hashes 01-Apr-2014 23:09:07 Adding #9 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/09-Crash.mp3...10.0 s, 114 hashes 01-Apr-2014 23:09:07 Adding #10 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/10-Kiss_Your_Past_Good-bye.mp3...10.0 s, 57 hashes 01-Apr-2014 23:09:07 Adding #11 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/11-Pink.mp3...10.0 s, 57 hashes 01-Apr-2014 23:09:08 Adding #12 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/12-Attitude_Adjustment.mp3...10.0 s, 74 hashes 01-Apr-2014 23:09:08 Adding #13 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/13-Fallen_Angels.mp3...10.0 s, 41 hashes added 13 tracks (130 secs, 847 hashes, 6.5154 hashes/sec) in 3.0 sec = 0.023 x RT Hash table saved to fpdbase (13 tracks, 847 hashes) done Hash table read from fpdbase (13 tracks, 847 hashes) Target density = 7 hashes/sec 01-Apr-2014 23:09:12 Adding #1 http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/01-Nine_Lives.mp3... *** skipping http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/01-Nine_Lives.mp3 - matched to http://labrosa.ee.columbia.edu/~dpwe/tmp/Nine_Lives/01-Nine_Lives.mp3 0.0 s, 0 hashes added 1 tracks (0 secs, 0 hashes, NaN hashes/sec) in 0.2 sec = Inf x RT done ``` -------------------------------- ### Audfprint Command Line Usage Source: http://www.ee.columbia.edu/~dpwe/resources/matlab/audfprint This section outlines the general usage and available command-line options for the audfprint utility. ```APIDOC ## Audfprint Command Line Options All parameters to `audfprint` are specified in the command line via "-optionname value" pairs. The full set of options is: ### General Usage ``` audfprint -help ``` ### Database Options - **-dbase ** - Description: The reference database file. - **-cleardbase 0/1** - Description: Create a new database with options... - **-nhashbits ** (Optional, default: 20) - Description: log_2 of hash table size. - **-maxnentries ** (Optional, default: 100) - Description: maximum number of entries per bin. - **-timesize ** (Optional, default: 16384) - Description: Maximum value of abs time index. - **-hoptime