Ejemplo n.º 1
0
 public static BLEHandler GetHandler()
 {
     if (instance == null)
     {
         instance = new BLEHandler();
     }
     return(instance);
 }
Ejemplo n.º 2
0
        public VRHandler(Label label, ActivityIndicator indicator)
        {
            micService = DependencyService.Resolve <IMicrophoneService>();

            this.bleHandler     = BLEHandler.GetHandler();
            this.drivingHandler = DrivingHandler.GetHandler();

            this.lText     = label;
            this.indicator = indicator;

            // initialize speech recognizer
            if (recognizer == null)
            {
                var config = SpeechConfig.FromSubscription(Constants.CognitiveServicesApiKey, Constants.CognitiveServicesRegion);
                //string[] languages = { "cs-CZ", "en-US", "en-GB" };
                AutoDetectSourceLanguageConfig lang_config = AutoDetectSourceLanguageConfig.FromLanguages(Constants.GetLanguages);
                recognizer             = new SpeechRecognizer(config, lang_config);
                recognizer.Recognized += (obj, args) =>
                {
                    Process(args.Result.Text);
                };
            }
        }
Ejemplo n.º 3
0
 private DrivingHandler()
 {
     this.bleHandler = BLEHandler.GetHandler();
 }