public NavigationController(MainController main, NaoController nao, ObjectLibrary lib) { this.stopped = false; this.nao = nao; this.lib = lib; this.main = main; }
public CommandGrammarBuilder(MainController.State state, ObjectLibrary lib) { this.strings = new List<string>(); switch (state) { case MainController.State.waiting: this.grammar = buildWaitingGrammar(); break; case MainController.State.start: this.grammar = buildStartGrammar(lib); break; case MainController.State.learn: this.grammar = null; break; case MainController.State.find: this.grammar = buildFindGrammar(); break; case MainController.State.confirmation: this.grammar = buildConfGrammar(); break; case MainController.State.getName: this.grammar = buildGetNameGrammar(); break; case MainController.State.getProperties: this.grammar = buildGetPropertiesGrammar(); break; } }
public ObjectLibrary(MainController parent, Rpc.Client client) { this.objects = new SerializableDictionary<string, RecogObject>(); this.lookupByProperty = new SerializableDictionary<string, List<RecogObject>>(); this.knownPointClouds = new Dictionary<string, PointCloud>(); this.unknownPointClouds = new Dictionary<string, PointCloud>(); this.client = client; }
public VoiceRecogition(Controller.MainController.Mapping mapping, MainController controller) { this.controller = controller; this.recogEng = new SpeechRecognitionEngine(); recogEng.SetInputToDefaultAudioDevice(); recogEng.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(speechRecog_success); recogEng.SpeechRecognitionRejected += new EventHandler<SpeechRecognitionRejectedEventArgs>( speechRecog_failure); recogEng.LoadGrammar(CreateSampleGrammar(mapping)); this.start(); }
private void initialize(Grammar grammar, MainController controller, bool start) { if (grammar != null) { this.controller = controller; this.recogEng = new SpeechRecognitionEngine(); recogEng.SetInputToDefaultAudioDevice(); recogEng.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(speechRecog_success); recogEng.SpeechRecognitionRejected += new EventHandler<SpeechRecognitionRejectedEventArgs>( speechRecog_failure); recogEng.LoadGrammar(grammar); if (start) { this.start(); } } }
public NaoController(string ip, MainController main) { try { this.main = main; this.ip = ip; prevAng = PI; proxy = new MotionProxy(ip, 9559); if (this.ip != "127.0.0.1") { tts = new TextToSpeechProxy(this.ip, 9559); } else { tts = null; } //this.setStiffness(1.0f); } catch (Exception e) { Console.Out.WriteLine("Connect exception: " + e); } }
public ObjectLibrary(MainController parent, Rpc.Client client, string path) { this.objects = new SerializableDictionary<string, RecogObject>(); this.lookupByProperty = new Dictionary<string, List<RecogObject>>(); this.knownPointClouds = new Dictionary<string, PointCloud>(); this.unknownPointClouds = new Dictionary<string, PointCloud>(); this.shut_down = false; this.block = false; this.parent = parent; this.client = client; if (System.IO.File.Exists(path)) { string[] lines = System.IO.File.ReadAllLines(path); foreach (string line in lines) { RecogObject obj = RecogObject.fromString(line); this.addObject(obj); } } }
private void Window_Loaded(object sender, RoutedEventArgs e) { controller = new MainController(this); }
public ForeCastViewModel() { _controller = MainController.Instance; GrowthInPercent = _controller.GetGrowthInPercent(); }
public VoiceRecogition(Grammar grammar, MainController controller) { this.initialize(grammar, controller, false); }
public VoiceRecogition(MainController.State state, MainController controller) { this.initialize(new CommandGrammarBuilder(state, controller.getLibrary()).getGrammar(), controller, true); }