SharpScraps is a collection of C# source code I put up on SourceForge.net some time ago. Rather than a cohesive library framework that you would rely on as a stable API, SharpScraps is just buckets of code that shows how to do some interesting things with .NET that you can include in your own projects (SharpScraps is licensed under the MIT license). Previously, you had to get the source from the subversion repository, but I just posted a zip file with the code that you can grab here.
SharpScraps Highlight of the Day
Voice Recognition and Text-to-Speech
SharpScraps.Speech contains some wrappers for the Windows APIs for voice recognition and text to speech conversion (see SharpScrapsExamples/TextToSpeech and SharpScrapsExamples/VoiceRecognition in the code drop to see how to use them). Voice recognition opens up some interesting possibilities. A few years ago (long before the Ford Sync voice control commercials started showing up), I put together a voice control program for iTunes. It used the iTunes COM control for retrieving the list of music in the library and used that as the basis for the phrase list fed into the SharpScraps.Speech.Recognition.PhraseRecognizer class (names such as "U2" were replaced with "you two" to help the system out). Then, if you said "Metallica", it would kick off a playlist containing all of your "Metallica" songs. If you said "still haven't found what i'm looking for", it would tell iTunes to play just that one song. At one point, I had the hopes of hooking up a Bluetooth earpiece, so I could walk around the house controlling my computer and asking it for information. Unfortunately, the Bluetooth drivers never seemed to support the headset profile, and even if they do now, I suspect the audio quality might not be high enough to make things work smoothly.
Text-to-Speech is the reverse of voice recognition. It takes textual input and converts it into audio. The SharpScraps example shows how to play the audio aloud or save it as a WAV file. The test dialog will let you select from any voice that is installed on the system. I believe Microsoft Anna is the only voice that comes with Windows, but better voices can be licensed from third-parties. On Windows XP, you might have to manually install the speech SDK (google 'microsoft sapi sdk'), or Microsoft Office might have installed it for you.
Anyhow, much fun is to be had with voice recognition and text-to-speech. Knock yourself out.


