public MainWindow() { OpenKinectSensor(); this.sr = new SpeechRecognition(this.kinectSensor, this.convertStream); this.st = new SkeletonFaceTracking(this.kinectSensor); this.tts = new TextToSpeech(this.sr); this.af = new AudioFrame(this.kinectSensor); this.msi = new MultiSourceImage(this.kinectSensor); InitializeComponent(); // Need to create the responder after models because it's using instance of sr, srw, st & tts this.updater = new ParametersUpdater(this.sr, this.st, this.tts, this.msi, this.af, this.srview, this.stview, this.ttsview, this.rgbdmicview); }
public ParametersUpdater(SpeechRecognition sr, SkeletonFaceTracking st, TextToSpeech tts, MultiSourceImage msi, AudioFrame af, SpeechRecognitionView srv, SkeletonTrackingView stv, TextToSpeechView ttsv, RGBDplusMic rgbdmicv) { this.sr = sr; this.st = st; this.tts = tts; this.msi = msi; this.af = af; this.srv = srv; this.stv = stv; this.ttsv = ttsv; this.rgbdmicv = rgbdmicv; this.mw = (MainWindow)Application.Current.MainWindow; this.responder = new NetworkResponder(); this.responder.Bind("33412"); this.json_thread = new Thread(new ThreadStart(this.ReceiveAndUpdate)); this.json_thread.SetApartmentState(ApartmentState.STA); this.json_thread.IsBackground = true; this.json_thread.Start(); }