public PCInterface(GameObject instance) { _using_PCI = MasterController.BRAIN.pm().get_usePerceptual(); _gesture = instance.GetComponent<PerCGesture>(); _voice = instance.GetComponent<PerCVoice>(); _handpos = new float[2]{0,0}; }
void Start() { PV = gameObject.GetComponent<PerCVoice>(); myPipe = new PXCUPipeline(); commandsSet = myPipe.SetVoiceCommands(commands); if(!commandsSet)Debug.Log("Failed to set Commands! :'("); if(!myPipe.Init(myMode) || !commandsSet){ Debug.LogError("Failed To initialize PipeLine OH NOES!"); initiated = false; return; } else {initiated = true; myPipe.SetDeviceProperty(audio_mix_prop,volume);}//must choose a volume that handles the environment, sensitive mic //default the bool arrays to false. numbers = new bool[10]; options = new bool[commands.Length-10]; for(int i = 0; i<numbers.Length;i++)numbers[i] = false; for(int j = 0; j<options.Length;j++)options[j] = false; keepLooping = true;//tell the thread not to stop dictated = null; myThread = new Thread(ThreadFunc);//make thread handle myThread.Start(); //let 'er rip! }