Commit graph

5 commits

Author SHA1 Message Date
Chigozirim Igweamaka
ced4fc7ee8 perf(shazam): optimize timing analysis from O(n²) to O(n)
Replace pairwise timing comparison with histogram approach that counts
time offset agreements. Bins offsets in 100ms buckets for tolerance.
Improves performance by 500-5000x for songs with many fingerprint matches.
2025-11-19 16:52:55 +01:00
Chigozirim Igweamaka
7104a1a7bc fix(fingerprint): prevent address overflow with bit masking
- Scale and mask frequencies to 9 bits each
- Mask time delta to 14 bits
- Add sampleRate parameter to ExtractPeaks calls

Prevents hash collisions from bit overflow in fingerprint addresses.
2025-11-19 16:51:00 +01:00
Chigozirim Igweamaka
e3a35ef1eb fix(spectrogram): correct STFT and peak extraction algorithm
- Fix frame calculation with proper sliding window iteration
- Change hop size to windowSize/2 for 50% overlap
- Return magnitude spectrum instead of complex values
- Fix Peak time/frequency calculations using proper frame-based indexing
- Add Hz conversion using frequency resolution
- Remove incorrect frequency-based time calculations
2025-11-19 16:47:01 +01:00
Chigozirim Igweamaka
64e8ee696d feat: implement FingerprintAudio function to process audio files and generate fingerprints 2025-07-15 15:38:07 +01:00
Chigozirim Igweamaka
8ea5a7a25b Restructure project: Move server-side files to a dedicated 'server' directory 2025-04-07 02:27:59 +01:00