Discuss audio compare in the Python Programming forum on Dev Shed. audio compare Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
Time spent in forums: 3 Days 6 h 10 m 21 sec
Reputation Power: 34
I don't think I've ever heard of a way of doing this.
You know if you take a picture of the sky, then adjust the contrast, it looks a slightly different shade of blue?
When saved as a file, each pixel would be saved as a colour value. The original file might be:
200 200 200 210 210 210 220 220 220 ...
And the adjusted file might be:
210 210 200 200 200 195 195 195 200
You're essentially looking for a program that would see both of those and say "they are similarly blue, so they are probably the same image", but for audio. Which is pretty much an impossibly hard problem until you get to artificial intelligence that could interpret the picture as a human would, which is also pretty much an impossible problem currently.
Audio samples would be completely different based on all sorts of things - volume of the recording, quality of cable, interference, small variations in pitch or tone, digitization and processing at the radio station (if they sped it up a bit to knock a fraction of a second off the time, or if they faded it into something else, and so on), errors in sampling when you recorded it, etc.
There are some ideas for "audio watermarks" around - i.e. something you put in the sound before hand, then you can check when you hear it to see if it really was the same sound - but if you were using one of those, you'd probably know about it.
I think you might get somewhere if you had a very distinctive part in your advert, say a 100Hz thud lasting 1/10th of a second. Then you could try to do some analysis of the recording to identify areas with above average power at 100Hz lasting between 1/15th and 1/5th of a second.
But that would probably involve a lot of effort (more than just listening to a few days of radio ), a lot of maths (Hello fast-fourier transforms), and a lot of knowing what you were doing, which counts me out.
Last edited by sfb : March 27th, 2005 at 07:06 PM.
Time spent in forums: 21 h 40 m 18 sec
Reputation Power: 9
Originally Posted by mohikan
I have a trouble like that,
I have record audio from radio station and I have to search this record for my advertise.
there are something to record audio like pymedia
but I couldn't find anything to compare audios. I guess my keywords are wrong to search.
is there anybody here who has experience about it to give me hint
I have no experience in this but I do have an idea...
The problem with radio is that your ad might be slightly compressed, have the beginning or the end overwritten/overlapped, have static, etc.
The way I'd attack the problem would be to:
1/ Filter the audio to remove static (there should be smoothing algorithms)
2/ Consider the audio as a sequence of pitch differences - either higher or lower. You want to consider only large jumps so that minor changes don't affect - only pitch changes of a half tone or so.
3/ Convert both original and broadcast audio.
4/ Scan the converted broadcast for a chunk of the converted original.
Time spent in forums: 1 Week 2 Days 18 h 17 m 47 sec
Reputation Power: 68
I'm sure you've knowticed: a lot more companies are starting to use automated phone services where you speak into the phone i.e. our local Cinema has a phone service that asks you for the title of the movie, you say it and it reads the details.
Maybe the idea could be adapted to pick up on keywords from your ad'. I could I've missed the point here . Would be very interesting to see how this works though, very cool thread!
Time spent in forums: 2 Weeks 4 Days 2 h 58 m 23 sec
Reputation Power: 1372
Here is a wild idea...
You could try running the audio through a voice recognition/dictation program such as Dragon Naturally Speaking or IBM Via Voice, then searching the resulting text. You need to train the dictation program to recognise a particular voice, but that is no problem since you would only need to train it on the advert - it doesn't matter if the rest of the audio is translated to gibberish.
I don't know if either program are controllable from a scripting language like python, though, and I suspect that there would be other technical difficulties.I suspect that you would need to chop up the audio into small chunks and translate them a bit at a time, since I doubt they would cope with a huge audio file.