Closed Villagenoise closed 7 years ago
I seeing the same issue, i looked into the code and tried modifying hash algorithm, but no luck
Algorithm will always select an answer - you have to threshold on confidence level from match dictionary if you want to prevent spurious / false positive matches.
The exact confidence threshold needed is corpus-dependent - you'll have to find what works best for the set of audio tracks you're using.
I'd add that for content synchronization (presenting ongoing information about a piece of audio versus simple recognition), it can be helpful to establish a "roaming threshhold" once initial recognition is achieved, both to adjust for the known anticipated confidence levels, and to override the values returned when they don't make sense based on known context.
eg., if we know a particular audio stream doesn't produce high confidence values even when properly recognized under ideal conditions (due to poor spectrographic complexity for instance, or presence of other non-unique audio) we might want to temporarily accept lower threshhold matches. We might also discard out-of-scope matches, or require higher confidence threshholds for those matches) during that period.
For instance, if we were providing synchronized content to Eminem's "Stan", even though recognizing the sample of Dido's "Thank You" would be technically accurate, it might be useless.
This comes up with synchronization to long form content like movies and television shows: if you're presenting second-screen information coinciding with a motion picture, there's a good chance that suddenly recognizing the song on a car radio is counterproductive unless that's actually the intended user experience.
i tried to start the code with no song playing and i realized that the code was printing random songs from the database.Which is not good .will be glad if anyone can help me out.