what would be the most efficient ("cheap" in terms of system resources etc.) way to compare 2 sound files?
Here is the scenario. Sound A comes as an input. There is sound B stored in memory. We need to see if sound A is identical to sound B. We know that both sounds can be copies of the same sound file, but there is a chance that sound B was processed to reduce the size.
What would be the most efficient ways to compare these sounds and see if they are similar (or rather the same).
ADDED
- "Cheap", architecture is Cortex ARM M0. 16kb ram, 256kb flash.
- "Identical" means that these 2 sounds come from the same sound file (same exact sound effect). THe difference may be that sound B (stored on the microcontroller side) may be processed to reduced size. Basically imagine we have 10 sound files, we copy N7 to MCU (maybe process it to reduce size) and then play them and expect MCU to recognize the sound file when it's played.
The kind of sound - technically it can be any sound (within the frequencies recognizable by humans). Sound effects (explosions, weapons firing, tires screeching), people saying words, melodies played by musical instruments. But the common thing is that they are all identical (instruments playing melodies would be same instruments same room, same time, recorded with the same microphone etc.).
Worth mentioning (to avoid confusion), that the sound is being sent to MCU from a sound output, not as a file.