(resourceStrings.InputSwitchAccName);
            this.micButtonEnabled = ko.observable(true);
            this.micButtonAccNameEnabled = ko.observable(resourceStrings.MicButtonAccNameEnabled);
            this.micButtonAccNameDisabled = ko.observable(resourceStrings.MicButtonAccNameDisabled);
            this.micButtonAccName = ko.pureComputed(() => {
                return this.micButtonEnabled() ? this.micButtonAccNameEnabled() : this.micButtonAccNameDisabled();
            });
            this.micEnabledVoiceOver = ko.observable(resourceStrings.MicEnabledVoiceOver);
            this.cortanaIconAccName = ko.observable(resourceStrings.cortanaIconAccName);
            this.volumeControlAccName = ko.observable(resourceStrings.VolumeControlAccName);
            this.showVolumeControlButton = ko.observable(true);
            this.speechRecognition = AppObjectFactory.getInstance().getObjectFromString("CloudExperienceHostAPI.Speech.SpeechRecognition");
            this.speechController = AppObjectFactory.getInstance().getObjectFromString("CloudExperienceHostAPI.Speech.SpeechRecognitionController");
            this.speechControllerState = CloudExperienceHostAPI.Speech.SpeechControllerState.disabled;
            this.micDisabledExplicitly = false;
            this.micStateTimer = null;
            this.micState = ko.observable("");
            this.micText = ko.observable("");
            this.showMicArea = ko.observable(false);
            this.updateMicButtonTextAndState();
            this.isCortanaMutedString = "isCortanaMuted";
            this.isSpeechAllowedByPolicy = true;

            try {
                this.isSpeechAllowedByPolicy = this.speechController.isSpeechAllowedByPolicy();
            } catch (exception) {
                CloudExperienceHost.Telemetry.logEvent("IsSpeechAllowedByPolicyError", core.GetJsonFromError(exception));
            }

            this.speechController.addEventListener("statechanged", this.onMicStateChanged.bind(this));
            bridge.invoke("CloudExperienceHost.Environment.isSpeechDisabled").done((isSpeechDisabled) => {
                bridge.invoke("CloudExperienceHost.Cortana.isCortanaSupported").done((isCortanaSupported) => {
                    bridge.invoke("CloudExperienceHost.Storage.SharableData.getValue", this.isCortanaMutedString).done((isCortanaMuted) => {
                        // Explicitly show mic area as it won't be in the right state if we haven't called enableAsync yet but if isCortanaMuted is 1, we know it's valid
                        if (!isSpeechDisabled && isCortanaSupported && isCortanaMuted) {
                            this.showMicArea(true);
                        }

                        this.speechController.enableAsync(!isSpeechDisabled && isCortanaSupported && !isCortanaMuted && this.isSpeechAllowedByPolicy); // onMicStateChanged callback will show & enable the button if this succeeds
                    }, (err) => {
                        this.speechController.enableAsync(!isSpeechDisabled && is