KinecTunes

Description

Another cool NUI example that simplifies the controlling of another media player. What I liked was how not only generic, start/stop/etc. voice commands were shown off, but specific track support too, "Kinect Play Track [song name here]"

Introducing KinecTunes - Control iTunes with Your Voice!

A few weeks ago, Microsoft released a SDK for the Kinect. As I had just gotten a Kinect, I was excited to check it out. I love the voice command feature of the Kinect (especially for Netflix on Xbox), so naturally I decided to make an app that incorporated them. I wanted something useful, something beyond just a workable demo. Today, KinecTunes is complete - the ability to control iTunes with voice commands!

Features

  • Play specific songs or artists
  • Pause, Resume, or Stop the currently playing song
  • Two versions: Command-line tool and Windows Form app

Project Information URL: http://kinectunes.codeplex.com/

Project Download URL: http://kinectunes.codeplex.com/releases/view/69578

Project Source URL: http://kinectunes.codeplex.com/SourceControl/list/changesets

image

private Grammar BuildItunesGrammar(RecognizerInfo ri)
{
     Choices choices = new Choices();
     itunesConnector = new ItunesConnector();
     List<KinecTrack> tracks = itunesConnector.GetFullLibrary();

     // Get list of all Artists and add new command for each
     List<string> artistList = tracks.Select(song => song.Artist).Distinct().ToList();
     foreach (var artist in artistList)
     {
         if (artist != null)
         {
             choices.Add(string.Format("kinect play artist {0}", artist));
         }
     }

     List<string> songList = tracks.Select(song => song.Name).Distinct().ToList();
     foreach (var song in songList)
     {
         if (song != null)
         {
             choices.Add(string.Format("kinect play song {0}", song));
         }
     }

     // Add playback functionality
     choices.Add("kinect pause");
     choices.Add("kinect play");
     choices.Add("kinect stop");
     choices.Add("kinect terminate");

     // Specify the culture to match the recognizer in case we are running in a different culture.
     var gb = new GrammarBuilder();
     gb.Culture = ri.Culture;
     gb.Append(choices);

     return new Grammar(gb);
}

Contact Information: