Sign in to follow this  
Followers 0
iggy

Sound Detect

11 posts in this topic

I'm looking for a command that allow my script to detect WHEN a sound is played.

(i tried with ProcessExists but i understand is wrong :ph34r: )

In the help file i only found command to play sound or change the volume but not for detect when is played.

Share this post


Link to post
Share on other sites



I don't think you can do that with AutoIt since any application can talk to the sound card. AutoIt has no way of knowing what other programs are sending to the audio channels


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Ok thanks :ph34r:

Share this post


Link to post
Share on other sites

I'm looking for a command that allow my script to detect WHEN a sound is played.

(i tried with ProcessExists but i understand is wrong B) )

In the help file i only found command to play sound or change the volume but not for detect when is played.

I am interested in the same general thing. I want to do something like poll the sound port(s) or monitor messages related to sound devices. I would like to activate Program B when, for example, audio output is detected, and deactivate Program B when audio is not detected for a specified time interval.

I have seen some commercial sound recording programs that monitor an audio channel and when the channel is active, it automatically records. When the channel is inactive, recording is paused. Does AutoIt have any hooks to these audio channels?

techmail55

Share this post


Link to post
Share on other sites

I am interested in the same general thing. I want to do something like poll the sound port(s) or monitor messages related to sound devices. I would like to activate Program B when, for example, audio output is detected, and deactivate Program B when audio is not detected for a specified time interval.

I have seen some commercial sound recording programs that monitor an audio channel and when the channel is active, it automatically records. When the channel is inactive, recording is paused. Does AutoIt have any hooks to these audio channels?

techmail55

Might want to google that. You may be able to come up with a DLL solution that can get access to the sound in the way you are wanting. In AutoIt natively I dont believe there is a way.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

You could use winscope.exe (free and small) to detect line in sounds. your script would have to monitor winscope as to when it registered a certain amount of decibles. Its a work around..but perhaps it could work for you. Thought about this as a way to run a program based on decibel input. Like if my neighbors get too noisy, it would initiate a record sequence to record their noise and play it back through my huge speakers at ten times the volume with a three second delay..... B):o

Share this post


Link to post
Share on other sites

Like if my neighbors get too noisy, it would initiate a record sequence to record their noise and play it back through my huge speakers at ten times the volume with a three second delay.....

That would be great!! :oB)

Share this post


Link to post
Share on other sites

im not sure how to do it! but im sure there is a way with a specifique dllcall from winmm.dll. search for api dll function MCI.


GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Like if my neighbors get too noisy, it would initiate a record sequence to record their noise and play it back through my huge speakers at ten times the volume with a three second delay..... B):o

You just gave me an idea of a software version of a dog silencer where a high pitched sound, too high in frequency for humans to hear is used to blast a barking dog to discourage it from barking at inappropriate times. Now all I need is the API call to detect sounds and I should be able to get the sound card to play the appropriate WAV file at appropriate volumes on a spare set of speaker channels from my sound card and some outdoor speakers.

The only version of Winscope I have seen is 2.51 which is getting a bit dated and only supports 8 bit mode on sound cards. Has anybody had experience with using this on more modern systems such as XP with 5.1 and 7.1 channel 16/32/64 bit sound cards?

Edited by Confuzzled

Share this post


Link to post
Share on other sites

just thinking..i am not a programmer. However...Every sound forms a wave. Attack, decay,sustain and release. It you were to take a "picture" of that wave and be able to compare it and select a wave from a file on your computer that is the best match...would be ideal. I think that there is something in SDK voice recoginition that must be doing that. Gotta be some dlls out there for comparing waves or sensing volumes. I know there are many oscilloscope programs besides winscope. That worked for me for a while but crashes now. Sonic foundry is good for capturing wave forms. I just dont know if I could compare two waves , like you would do to pic files, to see if they are similar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0