Convert sound to code

I want to create a program that listen to a sound, and if its a certain sound, do something.
What would I need to create such a program? Any special equipment, or is it possible to create all I need using code?

Any advice is appreciated.
Code's good enough, but creating an algorithm to recognize specific sounds may be quite hard.
You can modify this program:
http://www.dreamincode.net/forums/topic/208153-sound-recorder-using-the-low-level-windows-api-in-c/

Read more about DSP to do what you need.
Were you wanting to write your own "sound listening" routines? Or would a library you can use in your program be ok?? If the latter, then there are open source libraries like Sphinx. Or with Windows and OS X you can use the system provided speech recognition functionality.

And when you talk about a "sound" causing a program to do something, as you talking about voice commands?

With Windows, voice commands are one of the Ease of Access (accessibility) features. To switch the feature on (in Windows 7) then use:

Start > Control Panel > Ease of Access > Speech Recognition

The system will then forward standard commands onto your program without it having to know how to recognize speech itself.

I don't know the details of how to enable this feature on OS X or Linux, but it os definitely possible (OS X has built-in support, but Linux will prob require a suitable library to be installed.)

Andy

Speech recognition
http://en.wikipedia.org/wiki/Speech_recognition

CMU Sphinx
http://en.wikipedia.org/wiki/CMU_Sphinx

Speech Technologies
http://msdn.microsoft.com/en-us/library/hh323806%28v=office.14%29.aspx

Recognizing Speech
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Speech/Articles/RecognizeSpeech.html
(in Objective C)

How to use speech recognition in Windows 7
http://howto.cnet.com/8301-11310_39-20123500-285/how-to-use-speech-recognition-in-windows-7/

Set up Speech Recognition
http://windows.microsoft.com/en-gb/windows7/set-up-speech-recognition

Common commands in Speech Recognition
http://windows.microsoft.com/en-gb/windows7/common-commands-in-speech-recognition

List of speech recognition software
http://en.wikipedia.org/wiki/List_of_speech_recognition_software
Last edited on
What library do you recommend? Aquila 3.0 or SPUC? Or something else?

The sound recorder was very interesting, but not quite what I was looking for. But it does contain some crucial points.

EDIT: Grammar
Last edited on
Aquila 3.0 or SPUC are DSP lbraries, not speech recognition libraires.

Did you want to implement your own speech reconition functionality using a DSP library?

Or use a speech recognition library?

Andy
Last edited on
I didn't see your answer until after whriting my own, sorry Andy.

The program I'm planning on should recognize musical tones, not voice. It's supposed to see if the key stroke is accurate, and what key is being stroked.
Ah, ok. In that case a DSP library does make sense.

I've had a go with myself, using an FFT approach, but I used my own implementation of the Cooley-Tukey algorithm (which I had coded before for other reasons.)

I didn't get any further than recognizing the pitch of notes in single line melodies. I was only giving it a quick go, and while I did look into beat and envelope detection algorithms I didn't actually go on to implement any of them.

If you want to go on to analyze the dynamics as well as the pitch and timing, it's going to get quite involved!

Andy

PS Checking my notes, I see a number of links to posts at dsp.stackexchange.com
Last edited on
Thank you. I will give it a try, but if its to complicated there will be nothing to show. :)
Do you know about FFTs already? Or are learning about them for this project?

Andy
Topic archived. No new replies allowed.