I don't want sound-to-text software. What I need is the following:
Do you know of such software library? LGPL would be most valuable to me, but I can go for commercial license as well.
Audio clips will contain both music, text, effects, or any combination thereof. So, TEXT recognition is out of the question.
Architecture: c++, C# for glue, CUDA if possible.
I have not found any libraries (yet), but two interesting papers, which may give you terminology and background to refine your searches:
EDIT: Searching for "Audio fingerprinting" came to a page of implementations, both open source and commercial.
Here is an introduction to Audio fingerprinting
What you are describing is a matched filter and all you need is a cross-correlation function which should be part of any reasonable DSP library. Depending upon your choice of processor architecture and language you may even be able to find a vectorized library that can perform this operation more efficiently.
If you don't really care about performance you could use Python...
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> interesting_clip = [ 5, 7, 2, 1]
>>> full_stream = [ 1, 5, 7, 2, 1, 4, 3, 2, 4, 7, 1, 2, 2, 5, 1]
>>> correlation = scipy.correlate (full_stream, interesting_clip)
>>> print correlation
[56 79 55 28 41 49 44 53 73 48 28 35]
>>> for offset, value in enumerate(correlation) :
... if (value > 60) :
... print "match at position", offset, "with value of", value
...
match at position 1 with value of 79
match at position 8 with value of 73
My threshold above is arbitrarily. You should experimentally determine what is appropriate for you.
Keep in mind that the longer your "interesting clip", the longer it will take to compute the correlation. While longer clips will help actual matches stand out better from non-matches, you probably won't need more than a few seconds.
AudioDB is an open source c++ project that searches for similar sections of audio, and handles noisy streams, and can give you a measure of similarity. It can be run as client/server, but I believe you can do a standalone program.
The other answers about dsp correlation are kind of correct, but in general these dsp algorithms want to compare two streams of the same length, which have the similar parts overlapping.
What you need requires it to work on arbitrary segments of the stream; this is what AudioDB was built for. (One application is to find hidden references/sampling or blatant copyright misuse.) I've used it for finding sounds that were played backwards, and it also finds the case where some noise or speech changes are introduced.
Note that it is still under development even though the dates on the home page seem to off. I would subscribe to the mailing list and ask what the current state is and how you might go about incorporating it.
You might want to look at this paper by Li-Chun Wang regarding www.shazam.com.
It is not an API but it does give details of how their algorithm was developed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With