An energy-based pattern recognition algorithm receives the input frames of
an audio signal and a test frame sequence and returns a best match in the
audio signal to the given test frame sequence. The energy of each input
frame is computed and input frames for which the energy is both within a
predetermined degree of closeness to the local maximum energy within the
test frame sequence and a local maximum within a respective neighborhood
of adjacent frames are identified as probable matches. The difference
between overall energy for frames neighboring the remaining probable
matches and the test frame sequence is computed as a percentage. The best
match is selected based on a weighted combination of difference between
local maximum energies and minimum percent deviation in overall energy.
Local signal characteristic matching may be employed, with weighting, to
refine matching.