dpwe / audfprint

Landmark-based audio fingerprinting
MIT License
536 stars 121 forks source link

How to Debug a Non Match #75

Open vikasmultitv opened 4 years ago

vikasmultitv commented 4 years ago

Have been using this since a Month. Never found a Mis Match/ Non Match :) But Today Found a Mis Match. We are matching a 30/20/15 Seconder file in a 1 Minute Recorded Chunk.

Could you please help me how to debug if there is any Non Match/Miss Match Occurs. For Example in below Sample Files 30 Seconder is not Matched.

1 Minute File (you can say this is query.mp3) http://35.154.240.36/debug_files/p1-1580186349-0609.mp3

30 Seconder commercial (stored in database) http://35.154.240.36/debug_files/Clinic-Plus-Mother-Daughter-Making-Her-Strong_Hindi_30S.mp3

dpwe commented 4 years ago

They're different mixes of the Ad. I see this quite a lot. In particular, the version in p1-1580186349-0609.mp3 http://35.154.240.36/debug_files/p1-1580186349-0609.mp3 is substantially time compressed - the voice comes in 2 seconds sooner after the beginning of the music, then the pauses in the speech are edited down, leaving very little of the matching time base at any given skew offset to match. See the attached screenshot, where I've manually aligned the beginning of the first word around t=2.5. You can see the piano starts much earlier in the top version (Clinic-Plus-Mother), but then the syllables with the up pitch sweep that occur at t=7.5 in the top pane have been moved earlier to t=6.3 in the bottom pane by reducing the silent gaps between words.

Probably the appropriate solution here is to have multiple versions of the reference ad with all the different timing edits.

DAn.

On Tue, Jan 28, 2020 at 9:20 AM vikasmultitv notifications@github.com wrote:

Have been using this since a Month. Never found a Mis Match/ Non Match :) But Today Found a Mis Match. We are matching a 30/20/15 Seconder file in a 1 Minute Recorded Chunk.

Could you please help me how to debug if there is any Non Match/Miss Match Occurs. For Example in below Sample Files 30 Seconder is not Matched.

1 Minute File (you can say this is query.mp3) http://35.154.240.36/debug_files/p1-1580186349-0609.mp3

30 Seconder commercial (stored in database)

http://35.154.240.36/debug_files/Clinic-Plus-Mother-Daughter-Making-Her-Strong_Hindi_30S.mp3

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dpwe/audfprint/issues/75?email_source=notifications&email_token=AAEGZUOU4PYOTSIM2RJKTWTRAA5JLA5CNFSM4KMTHN62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IJHR6HA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEGZUPGFXTCNDMSDIPQE4DRAA5JLANCNFSM4KMTHN6Q .

vikasmultitv commented 4 years ago

Thanks DAN , I was also Studying around the issue and found about involving pitch shift.

PITCH SHIFT : if both scales are changed proportionally, we call this a change in “speed”: the song is played faster and at the same time at a higher pitch. This can be achieved by simply changing the rotational speed of the turntable, or by modifying the sampling rate of a digital media player – while keeping the sampling rate of the audio encoding unchanged. Changing the time scale only will be referred to as a “tempo” change: here, the audio is sped up or slowed down without observable changes in pitch. Vice versa, if only the frequency scale is modified, this will be called pitch shifting.

Not Sure about it but may be this could help me more for getting close to 100% Accuracy.

vikasmultitv commented 4 years ago

One More Question for Similar Commercials. From Similar I mean Same Commercials of 20 seconds and 30 Seconds. How can we find Maximum Score / Best Match?

In the Output Mentioned Below I Tried to Highlight the Actual Commericial. Can you Help me with the Parameter which I need to use at Backend for Marking as Best Match

Matched 4.6 s starting at 38.8 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 12.7 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Hindi_20S.mp3 with 54 of 58 common hashes at rank 0 Matched 26.0 s starting at 20.9 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 1.5 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Hindi_30S.mp3 with 19 of 22 common hashes at rank 1 Matched 11.0 s starting at 20.7 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 1.5 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Malayalam_30S.mp3 with 19 of 26 common hashes at rank 3 Matched 11.2 s starting at 21.9 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 2.9 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Marathi_30S.mp3 with 18 of 23 common hashes at rank 4 Matched 14.4 s starting at 21.8 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 2.5 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Assamese_30S.mp3 with 15 of 17 common hashes at rank 5 Matched 12.2 s starting at 21.8 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 2.4 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Punjabi_30S.mp3 with 13 of 30 common hashes at rank 2

dpwe commented 4 years ago

I would try a higher density; matching with 19 hashes in 10 sec is a week (although reliable) match. Try running both analysis and matching with --density 100. This will make the database larger, but unless you're dealing with a very large amount of data, it should be OK.

However, the rank 0 match is very strong and you're unlikely to rank above that. I'm not sure what's going on with that.

DAn.

On Tue, Feb 4, 2020 at 8:11 AM vikasmultitv notifications@github.com wrote:

One More Question for Similar Commercials. From Similar I mean Same Commercials of 20 seconds and 30 Seconds. How can we find Maximum Score / Best Match?

In the Output Mentioned Below I Tried to Highlight the Actual Commericial. Can you Help me with the Parameter which I need to use at Backend for Marking as Best Match

Matched 4.6 s starting at 38.8 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 12.7 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Hindi_20S.mp3 with 54 of 58 common hashes at rank 0 Matched 26.0 s starting at 20.9 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 1.5 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Hindi_30S.mp3 with 19 of 22 common hashes at rank 1 Matched 11.0 s starting at 20.7 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 1.5 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Malayalam_30S.mp3 with 19 of 26 common hashes at rank 3 Matched 11.2 s starting at 21.9 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 2.9 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Marathi_30S.mp3 with 18 of 23 common hashes at rank 4 Matched 14.4 s starting at 21.8 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 2.5 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Assamese_30S.mp3 with 15 of 17 common hashes at rank 5 Matched 12.2 s starting at 21.8 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 2.4 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Punjabi_30S.mp3 with 13 of 30 common hashes at rank 2

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dpwe/audfprint/issues/75?email_source=notifications&email_token=AAEGZUMFJMCPNAHELE7KYA3RBFSPLA5CNFSM4KMTHN62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKXSCYY#issuecomment-581902691, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEGZUMGZIZARQHMOOIINFLRBFSPLANCNFSM4KMTHN6Q .

vikasmultitv commented 4 years ago

Thanks DAn :)

Step 1 python audfprint.py new --dbase fpdbase.pklz --density 100 Nine_Lives/0.mp3 Step 2 python ../lib/audfprint.py match --dbase ../lib/fpdbase.pklz -x 5 --density 100 ../mp3_chunk/.mp3 --find-time-range --exact-count

Match Report which seems Right for this case. Will try other cases Matched 15.1 s starting at 20.6 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 1.4 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Malayalam_30S.mp3 with 256 of 946 common hashes at rank 4 Matched 15.0 s starting at 21.5 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 2.2 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Hindi_30S.mp3 with 233 of 824 common hashes at rank 5 Matched 17.0 s starting at 20.3 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 1.0 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Assamese_30S.mp3 with 209 of 1076 common hashes at rank 3 Matched 16.1 s starting at 20.4 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 1.4 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Marathi_30S.mp3 with 198 of 880 common hashes at rank 6 Matched 16.3 s starting at 20.3 s in ../mp3_chunk/p1-1580818624-1066.mp3 to time 0.8 s in commercials/Sensodyne-Rapid-Relief-People-Experiencing-Tooth-Sensitivity_Punjabi_30S.mp3 with 186 of 1215 common hashes at rank 0 Processed 1 files (60.0 s total dur) in 5.9 s sec = 0.099 x RT