Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to tune threshold? #21

Open
kristapsm opened this issue Mar 18, 2020 · 0 comments
Open

Any way to tune threshold? #21

kristapsm opened this issue Mar 18, 2020 · 0 comments

Comments

@kristapsm
Copy link

kristapsm commented Mar 18, 2020

Hello,
First of all thanks for such a nice tool.

I was curious if there is a threshold which can be tuned?
For example I have indexed 2 hours long audio file in json (I took an example from one of closed issues here) and cut out a 15 second clip from the same audio file which I am then comparing against this json file. It seems like some of the fingerprints match up throughout all the 2 hour audio file, but then repeats a lot of times exactly where it should. ( I have tuned the code a little bit so timecode is put as exact timestamp)

So for example if I compare the small 15 second clip against the whole 2 hours of audio, I get this -

{ time: '0:40', fingerprint: 920332 },
{ time: '0:56', fingerprint: 207915 },
{ time: '1:53', fingerprint: 2826250 },
{ time: '2:10', fingerprint: 4787722 },
{ time: '2:56', fingerprint: 2826250 },
{ time: '6:34', fingerprint: 4157 },
{ time: '6:34', fingerprint: 15632 },
{ time: '12:07', fingerprint: 14114 },
{ time: '12:07', fingerprint: 8759 },
{ time: '13:07', fingerprint: 47075 },
{ time: '13:07', fingerprint: 58295 },
{ time: '15:51', fingerprint: 1706252 },
{ time: '25:35', fingerprint: 920332 },
{ time: '26:03', fingerprint: 3934509 },
{ time: '26:04', fingerprint: 8759 },
{ time: '26:04', fingerprint: 14114 },
{ time: '27:48', fingerprint: 92813 },
{ time: '30:40', fingerprint: 599052 },
{ time: '32:24', fingerprint: 2439691 },
{ time: '33:51', fingerprint: 68644 },
{ time: '35:03', fingerprint: 211492 },
{ time: '36:32', fingerprint: 921098 },
{ time: '39:33', fingerprint: 8759 },
{ time: '39:33', fingerprint: 14114 },
{ time: '40:36', fingerprint: 1706252 },
{ time: '44:24', fingerprint: 4787722 },
{ time: '45:24', fingerprint: 2949928 },
{ time: '46:37', fingerprint: 1901062 },
{ time: '48:08', fingerprint: 4457230 },
{ time: '48:33', fingerprint: 1904898 },
{ time: '48:36', fingerprint: 197136 },
{ time: '49:23', fingerprint: 68644 },
{ time: '49:57', fingerprint: 4260376 },
{ time: '50:21', fingerprint: 270338 },
{ time: '50:28', fingerprint: 1185794 },
{ time: '50:28', fingerprint: 4260376 },
{ time: '59:07', fingerprint: 145932 },
{ time: '59:54', fingerprint: 1706252 },
{ time: '1:02:23', fingerprint: 599052 },
{ time: '1:05:09', fingerprint: 985892 },
{ time: '1:08:26', fingerprint: 2439691 },
{ time: '1:09:03', fingerprint: 42892 },
{ time: '1:09:03', fingerprint: 36007 },
{ time: '1:09:49', fingerprint: 145932 },
{ time: '1:12:17', fingerprint: 1704723 },
{ time: '1:12:24', fingerprint: 374162 },
{ time: '1:12:33', fingerprint: 393732 },
{ time: '1:12:55', fingerprint: 131587 },
---- HERE STARTING THE 15 sec clip -----
{ time: '1:13:00', fingerprint: 197152 },
{ time: '1:13:00', fingerprint: 278816 },
{ time: '1:13:00', fingerprint: 60099 },
{ time: '1:13:00', fingerprint: 50154 },
{ time: '1:13:00', fingerprint: 615489 },
{ time: '1:13:00', fingerprint: 736100 },
{ time: '1:13:01', fingerprint: 1114683 },
{ time: '1:13:01', fingerprint: 2687520 },
{ time: '1:13:01', fingerprint: 666951 },
{ time: '1:13:01', fingerprint: 3672578 },
{ time: '1:13:01', fingerprint: 4786747 },
{ time: '1:13:01', fingerprint: 921098 },
{ time: '1:13:02', fingerprint: 4100733 },
{ time: '1:13:03', fingerprint: 5243420 },
{ time: '1:13:04', fingerprint: 1250050 },
{ time: '1:13:04', fingerprint: 605971 },
{ time: '1:13:04', fingerprint: 1835539 },
{ time: '1:13:04', fingerprint: 2900031 },
{ time: '1:13:04', fingerprint: 3489811 },
{ time: '1:13:04', fingerprint: 266560 },
{ time: '1:13:04', fingerprint: 1904898 },
{ time: '1:13:04', fingerprint: 730129 },
{ time: '1:13:04', fingerprint: 992320 },
{ time: '1:13:04', fingerprint: 2630658 },
{ time: '1:13:05', fingerprint: 5139008 },
{ time: '1:13:05', fingerprint: 1974808 },
{ time: '1:13:06', fingerprint: 2838562 },
{ time: '1:13:06', fingerprint: 3774058 },
{ time: '1:13:06', fingerprint: 993872 },
{ time: '1:13:06', fingerprint: 3811874 },
{ time: '1:13:06', fingerprint: 2168618 },
{ time: '1:13:06', fingerprint: 3151696 },
{ time: '1:13:06', fingerprint: 1051671 },
{ time: '1:13:06', fingerprint: 3214378 },
{ time: '1:13:07', fingerprint: 590348 },
{ time: '1:13:07', fingerprint: 1638935 },
{ time: '1:13:07', fingerprint: 2556461 },
{ time: '1:13:08', fingerprint: 1580627 },
{ time: '1:13:08', fingerprint: 472094 },
{ time: '1:13:08', fingerprint: 2045011 },
{ time: '1:13:08', fingerprint: 1134644 },
{ time: '1:13:08', fingerprint: 1593374 },
{ time: '1:13:08', fingerprint: 268112 },
{ time: '1:13:08', fingerprint: 1382196 },
{ time: '1:13:08', fingerprint: 1840926 },
{ time: '1:13:10', fingerprint: 928576 },
{ time: '1:13:10', fingerprint: 1746845 },
{ time: '1:13:10', fingerprint: 2032171 },
{ time: '1:13:10', fingerprint: 1874599 },
{ time: '1:13:10', fingerprint: 226970 },
{ time: '1:13:10', fingerprint: 1144401 },
{ time: '1:13:11', fingerprint: 69146 },
{ time: '1:13:11', fingerprint: 2172969 },
{ time: '1:13:12', fingerprint: 3023912 },
{ time: '1:13:12', fingerprint: 211492 },
{ time: '1:13:12', fingerprint: 1575226 },
{ time: '1:13:12', fingerprint: 669961 },
{ time: '1:13:12', fingerprint: 1114681 },
{ time: '1:13:13', fingerprint: 75345 },
{ time: '1:13:13', fingerprint: 393766 },
{ time: '1:13:13', fingerprint: 2430722 },
{ time: '1:13:14', fingerprint: 2818583 },
---- HERE ENDING THE 15 sec clip -----
{ time: '1:14:45', fingerprint: 328196 },
{ time: '1:14:53', fingerprint: 268290 },
{ time: '1:15:14', fingerprint: 1901062 },
{ time: '1:16:43', fingerprint: 2630658 },
{ time: '1:18:06', fingerprint: 68644 },
{ time: '1:20:19', fingerprint: 3083304 },
{ time: '1:21:07', fingerprint: 204804 },
{ time: '1:21:07', fingerprint: 135200 },
{ time: '1:26:13', fingerprint: 4787722 },
{ time: '1:27:25', fingerprint: 96683 },
{ time: '1:27:41', fingerprint: 135200 },
{ time: '1:30:44', fingerprint: 1908750 },
{ time: '1:36:48', fingerprint: 204802 },
{ time: '1:40:22', fingerprint: 183452 },
{ time: '1:42:27', fingerprint: 938380 },
{ time: '1:45:04', fingerprint: 1517582 },
{ time: '1:55:11', fingerprint: 210434 },
{ time: '1:55:55', fingerprint: 918591 },
---- HERE STARTING THE 15 sec clip again which is expected -----
{ time: '1:56:21', fingerprint: 393732 },
{ time: '1:56:22', fingerprint: 2884100 },
{ time: '1:56:22', fingerprint: 666951 },
{ time: '1:56:22', fingerprint: 2501890 },
{ time: '1:56:22', fingerprint: 1408327 },
{ time: '1:56:22', fingerprint: 1182253 },
{ time: '1:56:22', fingerprint: 3672578 },
{ time: '1:56:23', fingerprint: 2826250 },
{ time: '1:56:23', fingerprint: 3899517 },
{ time: '1:56:23', fingerprint: 5275719 },
{ time: '1:56:23', fingerprint: 1969696 },
{ time: '1:56:23', fingerprint: 4787722 },
{ time: '1:56:25', fingerprint: 70439 },
{ time: '1:56:25', fingerprint: 1704723 },
{ time: '1:56:25', fingerprint: 1770279 },
{ time: '1:56:26', fingerprint: 2100994 },
{ time: '1:56:27', fingerprint: 2168618 },
{ time: '1:56:28', fingerprint: 1638935 },
{ time: '1:56:28', fingerprint: 2556461 },
{ time: '1:56:29', fingerprint: 4079149 },
{ time: '1:56:31', fingerprint: 1901059 },
{ time: '1:56:31', fingerprint: 938380 },
{ time: '1:56:32', fingerprint: 69146 },
{ time: '1:56:33', fingerprint: 131642 },
{ time: '1:56:33', fingerprint: 270338 },
{ time: '1:56:33', fingerprint: 401466 },
{ time: '1:56:35', fingerprint: 2818583 },
{ time: '1:56:35', fingerprint: 4935959 },
---- HERE ENDING THE 15 sec clip again which is expected -----
{ time: '1:56:48', fingerprint: 134147 },
{ time: '1:59:00', fingerprint: 131587 },
{ time: '1:59:01', fingerprint: 197136 },
{ time: '1:59:30', fingerprint: 657666 },
{ time: '1:59:42', fingerprint: 268290 },
{ time: '1:59:48', fingerprint: 4787722 },
{ time: '2:00:19', fingerprint: 1185828 },
{ time: '2:01:43', fingerprint: 920332 },
{ time: '2:02:39', fingerprint: 3214378 },
{ time: '2:05:22', fingerprint: 2826250 },
{ time: '2:06:55', fingerprint: 4157 },
{ time: '2:06:55', fingerprint: 15632 },
{ time: '2:07:38', fingerprint: 68644 },
{ time: '2:08:48', fingerprint: 1775628 }
]

So as you can see there is a lot of "noise" but I expect thats because the audio is containing voice which might be similar troughout the audio fingerprintwise. Or maybe I am doing something completely wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant