static int similarityToClippedRecordings_h = 20; // audioFile must already be clipped static Map<S, Float> similarityToClippedRecordings(File audioFile) { BWImage img = audioFileToFrequencyImage(audioFile); new Map<S, Float> map; img = smoothResizeBWImage_heightOnly(img, similarityToClippedRecordings_h); for (File f2 : clippedNamedRecordings()) { if (sameFile(audioFile, f2)) continue; BWImage img2 = audioFileToFrequencyImage(f2); img2 = smoothResizeBWImage_heightOnly(img2, similarityToClippedRecordings_h); float sim = bwImageSimilarityResized_ignoreRatioMismatch(img, img2, 0f); print(formatDoubleX(sim*100, 2) + "%: " + f2.getName()); map.put(f2.getName(), sim); } ret mapSortedByValuesDesc(map); }
Began life as a copy of #1018640
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018641 |
Snippet name: | similarityToClippedRecordings (named recordings only) |
Eternal ID of this version: | #1018641/14 |
Text MD5: | 74929b5aac892a41112e6399bf534235 |
Author: | stefan |
Category: | javax / audio recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-08 11:46:49 |
Source code size: | 758 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 342 / 415 |
Version history: | 13 change(s) |
Referenced in: | [show references] |