public void InitializeVoiceGrammar() { commands = new string[2]; commands[0] = "Open"; commands[1] = "Close"; _voiceCommands = new VoiceCommands(nui, commands); var voiceThread = new Thread(_voiceCommands.StartAudioStream); voiceThread.Start(); }
/// <summary> /// LoadContent will be called only once before drawing and it's the place to load /// all of your content. /// </summary> public virtual void LoadContent() { frameNumber = Kinect.FramesCount; content = ScreenManager.Game.Content; spriteBatch = ScreenManager.SpriteBatch; PrimitiveBatch = new PrimitiveBatch(ScreenManager.GraphicsDevice); font = content.Load<SpriteFont>("SpriteFont1"); // songs = MyExtension.LoadListContent<Song>(content, "Audio\\"); //songsarray = songs.ToArray(); // sampleMediaLibrary = new MediaLibrary(); random = new Random(); //MediaPlayer.Stop(); // stop current audio playback // generate a random valid index into Albums voiceCommands = ScreenManager.Kinect.voiceCommands; if (showAvatar) { userAvatar = new UserAvatar(ScreenManager.Kinect, content, ScreenManager.GraphicsDevice, spriteBatch); userAvatar.LoadContent(); } depthTex = new Texture2D(screenManager.GraphicsDevice, 320, 240); }
public void InitializeVoiceGrammar() { commands = new string[10]; commands[0] = "play mediaplayer"; commands[1] = "stop"; commands[2] = "next"; commands[3] = "previous"; commands[4] = "mute"; commands[5] = "unmute"; commands[6] = "resume"; commands[7] = "play project music"; commands[8] = "device one"; commands[9] = "device two"; _voiceCommands = new VoiceCommands(nui, commands); var voiceThread = new Thread(_voiceCommands.StartAudioStream); voiceThread.Start(); }