public void Dispose() { _audioEncoder.Dispose(); _videoEncoder.Dispose(); if (_audio != null) { _audio.Dispose(); } }
public void Stop() { if (sre != null) { sre.RecognizeAsyncCancel(); sre.RecognizeAsyncStop(); kinectSource.Dispose(); } }
public void Stop() { if (sre != null) { kinectAudioSource.Stop(); sre.RecognizeAsyncCancel(); sre.RecognizeAsyncStop(); kinectAudioSource.Dispose(); } if (speech != null) { speech = null; } }
public void Cleanup() { if (speechRecognitionEngine != null) { speechRecognitionEngine.UnloadAllGrammars(); speechRecognitionEngine.Dispose(); speechRecognitionEngine = null; } if (kinectAudioSource != null) { kinectAudioSource.Stop(); kinectAudioSource.Dispose(); kinectAudioSource = null; } }
private void Window_Closed(object sender, EventArgs e) { // audio stop sre.RecognizeAsyncCancel(); sre.RecognizeAsyncStop(); audioStream.Close(); audioStream.Dispose(); audioSource.Dispose(); // server stop server.Stop(); // kinect stop nui.Uninitialize(); // exit Environment.Exit(0); }