Please nominate your Qt Champions for 2021!

Recognize windows sound

  • Hello,
    Im wondering if its possible that application will recognize a specific sound.
    Lets say I have sound "something.wav" and once any standard/nonstandard windows aplication will play this sound, it would be recognized by QT and will trigger something.

    PS: the note can be affected by an overloading sound....

    Scenario: I have a specific sound "something.wav" and will play a movie in VLC/mediaplayer/etc and if something in the movie sound similar to "something.wav" it would trigger...

    • scenario is just an example, the sound can come from any application

  • Lifetime Qt Champion


    You would need to tap into your OS audio system to spy on the various audio sources.

    That's something that is highly low level and OS specific. Might not be possible on all systems.

  • @SGaist said in Recognize windows sound:

    That's something that is highly low level

    what doesit mean? low level?

  • Lifetime Qt Champion

    Meaning that you won't have a ready made solution. You'll have to dig into your OS API to see if you can access the audio output of other application the way you want it.

  • lets say i will use some tool which will create virtual microphone device which will be listening to windows sounds... then I only need to compare the sounds to my *.wav file...
    Can I kindly ask you only point me out what to roughly do? then ill do the reserch myself to make it work...

  • Lifetime Qt Champion

    You'll have to monitor the audio stream continuously until you get a sample that matches your reference closely enough.

Log in to reply