Thread: audio compare

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    36
    Rep Power
    11

    audio compare


    hi everybody,

    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

    regards
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep 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:

    Code:
    200 200 200 210 210 210 220 220 220 ...
    And the adjusted file might be:

    Code:
    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.

    Comments on this post

    • SimonGreenhill agrees : interesting
    Last edited by sfb; March 27th, 2005 at 07:06 PM.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    36
    Rep Power
    11

    thanks body


    many thanks body

    for your answer. it was so good and detailed.
    I read it a couple day ago and I waited for other replies. but I cant see new one

    I thought somethings like yours before sent this message .
    But I must admit it yours were better and clearly.

    I guess you worked or thought about it.

    take care body
  6. #4
  7. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,101
    Rep Power
    0
    Interesting thread, I've been wondering about this for a while. Question: What about comparing sound waveforms and providing some quick and dirty comparison metric (via FFT or whatever)?

    --Simon
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    36
    Rep Power
    11
    yes, it is interesting and different ,

    and fft is looking like only one way

    but I can't say that, "I can do it with fft"

    maybe I can learn

    life = learning

    thanks for both of you
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2005
    Posts
    78
    Rep Power
    10
    Originally Posted by mohikan
    hi everybody,

    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

    regards
    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.

    --OH.
  12. #7
  13. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    I seem to remember that auto-correlation was used to pull signals out of noise - heavy math tho

    http://www.answers.com/topic/autocorrelation-1

    grim
  14. #8
  15. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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!

    Take care,

    Mark.
    programming language development: www.netytan.com Hula

  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    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.

    Dave - The Developers' Coach
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    36
    Rep Power
    11
    yes guys,

    you have very heplful ideas and algorityms.
    hydroxide, I heard some ideas like yours from one of my friend.
    yes you right

    and grim, you right too, digital signal progressing is important, too important.

    devcoach, ads cant have speak or human voice . they can contain only a melody, maybe .

    netytan, yes it can be a commercial project, and they are some examples like yours.

    but I think, I am not enough well for it.

    can it do with python ? it is another doubt. because it is a big storage and hight performence work.

    however it is extra large shirt for me

IMN logo majestic logo threadwatch logo seochat tools logo