views:

293

answers:

7

I can't stand listening to conventional radio because I can't stand listening to ads. (The same goes for TV, where commercials are 200% louder than what you are trying to watch.)

Unfortunately, my wife needs to listen to the radio while getting ready in the morning.

I was thinking, we have plugins to block ads in our web browsers, why not for the radio?

Most radio stations offer their content streaming over the web. How would you got about designing an ad-blocker? Can you foresee any gotchas?

UPDATE

A couple points that came up...

What to replace the ads with: silence would be fine.

Identifying Ads: maybe the first time an add plays it wouldn't be recognized, but you would have to signal the software that this is an ad. The ad would be recorded. Would it be possible to process it and extract some kind of unique 'signature' so that the next time it plays it is recognized and muted?

+1  A: 

Given that the streaming happens live one obvious gotcha is what would you fill the time with? Theoretically you could cut out the radio altogether for 30 seconds or so, but that's not a very good solution.

Also, even assuming you can perfectly convert the radio speech to text (in real-time) - a big "if", how would you determine form a stream of text that an ad is about to start?

levik
i don't need to fill the time with anything, silence would be fine by me. although, probably wouldn't be too hard to fill it in with other music.
carrier
A: 

I'm not sure how you would go about doing it, but you could create some sort of audio "filter" that checks every the stream every so often (5-10 seconds).

If the filter fails, it would mean it's an advertisement, so you could turn off or mute the stream for a while.

Think of it like audio regular expressions.

Now come the problems.

As levik said, what do you fill dead time with?

How would you attach your filter to the streamer? If you hooked it up to the speaker feed directly this might work, but what do you do if you want to let audio from something else play, while muting the radio?

How computationally expensive would this be?

This sounds like an interesting project, if you make good progress on it, let us know!

samoz
A: 

LabVIEW by National Instruments has a bunch of audio (and vibration) analysis tools. One thought that comes to mind would be to compare the left and right channels. If they differ, then you probably have music. It could still be an ad though. I haven't used their audio tools, nor am I familiar with audio analysis, so you still have some homework to do.

Sometimes you need to abandon a programming approach and do it differently. I listen to music on pandora.com. The ads are visual on the monitor, but never audible. I choose the music type I want to hear and let it play.

Les
A: 

One thing you have to beware of is that some clients are so smart that they pause the ads if you turn down the volume too much. Spotify does this.

No problem on radio or pure media streams though.

A: 

About filling the blanks and handling the processing delays

If your wife isn't too obsessed about the timing, your tool could start 30 minutes before she gets up and thus have a buffer of ad-free radio.

Mr Grieves
good suggestion... however, one of the reasons she has to listen to it is to help her "keep track of time" while she's getting ready.just quiet during the commercials would be perfectly acceptable.
carrier
+1  A: 

For the simplest case, I would simply monitor a moving average of the volume of the stream as it comes in. If the moving average goes above a threshold (that would be tuned), then simply mute the volume (or cut it by 80%).

I did a quick google search, and it seems like this class would help (assuming you're doing it in .net): http://www.codeproject.com/KB/audio-video/SoundViewer.aspx

FryGuy
A: 

when you do the app can you post it -- its just what Im looking for...