In the first episode of the new Channel9 show Let’s Dev This, I walk through building a Hogwarts Sorting Hat. A Windows Phone 8.1 app in a pocket in the hat uses an accelerometer to pick the house and text-to-speech to yell out the house name. Currently, the trigger is touching a button, but I may change that. I built in a 3-second pause for dramatic effect, and then the Hat announces your house.
The episode is available at https://channel9.msdn.com/Shows/Lets-dev-this/LDT1601 or embedded below.