Home Automation with Voxeo (VoxML/Voice XML)
One of the features of my home automation system is the ability to call the house up and speak to it to ask it to do things. To enable this I'm using Voxeo and their excellent developer program which gives me an inbound phone number and the ability to host a VoiceXML application with voice recognition and text to speech.
Using Linq-to-XML I can build the required VoiceXML hand it off to Voxeo when they request it during an incoming call, e.g.
XDocument doc = new XDocument( new XDeclaration("1.0", "utf-8", "yes"),
new XComment("Voice XML feed"), new XElement("vxml",
new XAttribute("version", "2.1"),
new XElement("form", new XAttribute("id", "MainMenu"),
new XElement("field", new XAttribute("name", "room"),
hereswhatIdid,
new XElement("grammar", new XAttribute("type", "text/gsl"), new XCData( "[" + @" [ " + WholeHouseGrammar() + " ]" + "]")),
new XElement("noinput", "I did not hear anything. Please try again",
new XElement("reprompt")), new XElement("nomatch", "I did not recognize that command. Please try again", new XElement("reprompt"))), ...
The 'WholeHouseGrammar' is generated on the fly by examining the hierarchy of objects in the house so it includes every room, light, sprinkler, ...
At present the house only understands on/off commands but in the future I hope to hook it up to the natural language engine so that the grammar is instead constructed dynamically from every sentence that the house understands today when you chat to it.
So currently you say things like 'Front right sprinklers on' when you notice the lawn needs an extra cycle as you drive out the house. In the future you'll be able to ask it more complex questions like 'who called last week on friday after 4pm?' which is a question it can already handle using the chat interface.