November 10, 2007

Talking to My Television

Posted at November 10, 2007 06:51 PM in .NET , C# , Personal , home theater , speech , speech recognition .

I can now control my Pioneer PDP-5080 plasma television by using my voice. How cool is that!

Using Visual Studio 2008 Express, I was able to create a C# application that utilizes the .NET System.IO.Ports.SerialPort class and System.Speech.Recognition namespace to manipulate settings on my television. Currently, I am able to perform simple commands, like turning the television on and off, muting, adjusting volume, etc. But, the Pioneer RS-232 Protocol supports nearly every function you could want, so the sky is really the limit.

I was really surprised at how efficiently I was able to write a working program. I was expecting it would take upwards of 20 hours to figure out C# and the necessary API's, but, Visual Studio made it a snap! This was my first C# application, so there was a learning curve there. However, the language is similar enough to C++ and Java that it made picking up a breeze. The excessive amount of online tutorials and examples were also a plus. The only difficulty I had was figuring out how exactly to build grammars in .NET. The GrammarBuilder interface wasn't intuitive at first, with SemanticResultKey, SemanticResultValue, SemanticValue, and other classes confusing me at first. But, once I realized that I could just instantiate a GrammarBuilder with Choices, create a new Grammar from that, and then name the grammar, and finally load that named grammar into the SpeechRecognizer, it was all down hill. For the future, unless I need to use the API's grammar building functions, I think I will just create SRGS files manually.

So, now that I have a grasp on how to program voice recognition into programs, the sky is the limit for what's next. When I finally get around to buying a receiver, I'll be sure to get one that has a published RS-232 protocol. Then, I'll be able to say things like "Play DVD," and my receiver will be told to switch to the correct input, the television will follow, etc. Until then, I can always look into adding voice control for typical home theater PC functions. Both Winamp and foobar2000 (my two preferred audio players) have SDK's available. I would love to control my playlist via voice. It can be annoying navigating a library of a few thousand songs. Using your voice is so much more efficient.

Anyway, back to hacking.

Trackback

You can ping this entry by using http://blog.case.edu/gps10/mt-tb.cgi/16066 .

Comments

That is a awesome right up.. thx

Posted by Dan Mills at November 13, 2007 04:37 AM

Well I guess it won't be long before we hear that you're among the most important technical people in the world. Great job and you're one of the reasons the world continues to move forward technologically. Loved the post..

Posted by Dan at November 18, 2007 09:17 AM

Post a comment










Remember personal info?