flat assembler
Message board for the users of flat assembler.

Index > Windows > use the microphone to catch events.

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4352
Location: Now
edfed 27 Sep 2011, 18:28
i'd like to know if there is still a way to pick the microphone signal from sound card, just using a "standard" win32 api.

the goal would be first to do a simple "clap event".

each time you clap your hands, or just snap fingers, and the procedure will return a true in eax register.
that would be pretty no?

why not later implement a sort of sound mouse?up, down, right, left, stop, clic! clap, rollup, rolldown, etc... Laughing
Post 27 Sep 2011, 18:28
View user's profile Send private message Visit poster's website Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22 27 Sep 2011, 18:57
Post 27 Sep 2011, 18:57
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 27 Sep 2011, 18:58
yes, wave recording api can handle that.

but the task would fall on matching the input sound with the database sound. You could try using a checksum but might not always work because voice and sound can be the same but different length Wink
Post 27 Sep 2011, 18:58
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4352
Location: Now
edfed 27 Sep 2011, 19:17
typedef:

it will use filtering, and FFT in order to detect clap, clip, clac...
you cannot just compare waveforms. you should at least work in the frequency/amplitude dimension, the sounds spectrum.

the main problem i see is the real time aspect.
i don't know how works the execution of a window program. then, i cannot predict if it will be easy to code or not.

but i am sure it is possible to do. there are a lot of programs that still do FFT, but mainly in order to do sound effects, not to analyse it.

the audio recognission is not an hurry problem apprentlly. not more than a good lotery/poker/casino progam.


what i'd like to do with this kind of code would be very simple, and limited to very basic actions. for example, in a PPS presentation, it can be nice to have an original way to switch pages, clap!
Post 27 Sep 2011, 19:17
View user's profile Send private message Visit poster's website Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 676
Location: Mar del Plata
Enko 27 Sep 2011, 22:44
I remember 6 years ago, I installed an IBM voice recognition program.

It had an option to integrate with windows, you could say 'start' and Start menu would popup. You could create shortcuts with voice commands, like in a mobile phone. The thing didn't work well.
Post 27 Sep 2011, 22:44
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 27 Sep 2011, 23:00
edfed wrote:

the main problem i see is the real time aspect.
i don't know how works the execution of a window program. then, i cannot predict if it will be easy to code or not.


Idea Just make a simple CONSOLE app with a message loop and add a timer. Wink
Post 27 Sep 2011, 23:00
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.