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); }; } }
private DrivingHandler() { this.bleHandler = BLEHandler.GetHandler(); }