Click here to Skip to main content
14,301,484 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am working on a school project whereby i am needed to check if incoming sound from my pc mic matches some sound i have in a database. if it is a match, then it will show a text/label. any clue on how i should start? i am taught the C# code using visual studio. Thanks.
i am not really taught on ffts btw.
hope got some sample codes to learn and start on it.
Posted
Comments
   
What is that sound? Speech or not?
--SA
xbolslock 5-Feb-12 23:42pm
   
not speech. like doorbell.wav
Rate this:
Please Sign up or sign in to vote.

Solution 1

I have just one idea. It can work only if you the sound is human speech, some words. Also, the set of words should fit on some observable vocabulary. I would say, this is the only hope you have.

If this is acceptable, don't store any sounds, store words. When you receive sound, try to recognize it using available speech recognition engine. Try to recognize the sound as speech and in the case of success compare words. Use the assembly "System.Speech", name space System.Speech.Recognition; it comes with .NET Framework re-distributable package, please see:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.aspx[^].

That's all.

If you think you can compare two sound records without 100% match, you should present you criteria of "closeness" of them. But you don't need to do it. Just forget it. With your present level of understanding of the problems, if you work along, I don't believe you whole life time would be enough to approach this task. Just don't waste your time.

—SA
   
Comments
xbolslock 5-Feb-12 23:49pm
   
oh alright. but my criteria is speechless sound. thanks anyway
Rate this:
Please Sign up or sign in to vote.

Solution 2

This person had the same problem as you :
http://www.dreamincode.net/forums/topic/176251-how-can-i-recognize-electric-keyboard-piano-sounds-in-c%23/[^]

He was suggested with this library :
http://naudio.codeplex.com/[^]

Also this is a good resource :
http://channel9.msdn.com/coding4fun/articles/NET-Voice-Recorder[^]

If you're going to compare simple frequency sounds then FFT is the best way but if you are going to compare multi frequency sounds I think you should compare sound amplitudes and also have some research on this term : Cross-correlation[^]

Cross correlation libraries for CSharp :
http://www.meta-numerics.net/[^]

http://www.alglib.net/fasttransforms/crosscorrelation.php[^]

Hope it helps.
   
v2
Comments
xbolslock 6-Feb-12 1:23am
   
thanks! will run thru it! thanks =)
Amir Mahfoozi 6-Feb-12 1:27am
   
Have a good research ;)
xbolslock 6-Feb-12 1:31am
   
thanks =) do u have any sample codes or program? believe it would help me learn faster ><
Amir Mahfoozi 6-Feb-12 1:32am
   
No, but I wish you get to success in this way :)
xbolslock 6-Feb-12 1:33am
   
hahas! sure sure will try my best! thanks! =D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100