Namaskaram, I am a software developer. I am trying to build software that mutes the audio or shows a video of wisdom as soon as the advertisement starts during a sport live stream. The live stream generally has commentary or the voice of the crowd and another voice based on the sport being broadcasted and the audio of the advertisement is different. So, I wish to know If there is any property of audio that would help me detect whether the advertisement has started or not. Like noise reduction or something else that you might be aware of based on your experience and knowledge. Is there anything on this link that should be helpful to me? Pranam, Kartik Watwani

  • 1
    I love the euphemism, "video of wisdom"… you mean you want to insert your advert instead of theirs. If that were so simple, it would have been done years ago. Ads used to be more heavily compressed [ie louder, perceptually] than the broadcasts, but the introduction of LUFS monitoring has fortunately put paid to a lot of the loudness war. On a streaming service you could potentially check for the url swap as the adverts may be localised [which any decent ad blocker can do], but really that's all a 'web' issue, not one of 'sound design'
    – Tetsujin
    Commented Nov 10, 2021 at 19:16

1 Answer 1


As the link said : The AudioContext interface represents an audio-processing graph built from audio modules linked together, each represented by an AudioNode. then, it is a needed API used to access the Audio library from a Web client application, but it won’t give you information about what is inside an audio stream. As a graph based API, you can stack/merge multiple effect, sources… but not get an information which is not published.

You seem to ask for something like RDS (Radio Data System) to give you metadata, but the main metadata we can get from a podcast seems to be global to the whole stream (not « from xx:xx to xx:xx », ads…)

  • RDS is/was very oft misused anyway - leave it 30s before pressing the button… "oops I forgot." The watchdog in the UK I think eventually gave up trying to police it [I long ago stopped listening to commercial broadcasts that used it, so I lost track of how it went… I gave up caring;))
    – Tetsujin
    Commented Nov 10, 2021 at 19:12
  • @Frédéric I am building a browser extension and there is a chrome.tabCapture API that gives access to LocalMediaStream. Can that help me? Commented Nov 12, 2021 at 9:35
  • As Tetsujin said, the most obvious way to get the information is if the source switch URL or make something observable. If the ad is well embedded in the stream, your PC wont receive the « this is an ad » information, then no API would get you what you want. Commented Nov 12, 2021 at 15:56
  • "but it won’t give you information about what is inside an audio stream" - This is not entirely correct in this form. While it won't magically describe the audio in plain English, you can do as detailed audio analysis as you want. It has built-in methods not only for time-domain audio analysis, but frequency/spectrum analysis as well. From that, you can make assumptions of what's in the signal. Using it to distinguish an ad from non-ad audio is an entire career's worth of work though.
    – John Weisz
    Commented Nov 16, 2021 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.