# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property

import winrt._winrt
import winrt.system
import winrt.windows.foundation
import winrt.windows.foundation.collections
import winrt.windows.globalization
import winrt.windows.storage

from winrt.windows.media.speechrecognition import SpeechContinuousRecognitionMode, SpeechRecognitionAudioProblem, SpeechRecognitionConfidence, SpeechRecognitionConstraintProbability, SpeechRecognitionConstraintType, SpeechRecognitionResultStatus, SpeechRecognitionScenario, SpeechRecognizerState

Self = typing.TypeVar('Self')

class SpeechContinuousRecognitionCompletedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechContinuousRecognitionCompletedEventArgs: ...
    @_property
    def status(self) -> SpeechRecognitionResultStatus: ...

class SpeechContinuousRecognitionResultGeneratedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechContinuousRecognitionResultGeneratedEventArgs: ...
    @_property
    def result(self) -> typing.Optional[SpeechRecognitionResult]: ...

class SpeechContinuousRecognitionSession(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechContinuousRecognitionSession: ...
    def cancel_async(self) -> winrt.windows.foundation.IAsyncAction: ...
    def pause_async(self) -> winrt.windows.foundation.IAsyncAction: ...
    def resume(self) -> None: ...
    @typing.overload
    def start_async(self) -> winrt.windows.foundation.IAsyncAction: ...
    @typing.overload
    def start_async(self, mode: SpeechContinuousRecognitionMode, /) -> winrt.windows.foundation.IAsyncAction: ...
    def stop_async(self) -> winrt.windows.foundation.IAsyncAction: ...
    def add_completed(self, value: winrt.windows.foundation.TypedEventHandler[SpeechContinuousRecognitionSession, SpeechContinuousRecognitionCompletedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_completed(self, value: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_result_generated(self, value: winrt.windows.foundation.TypedEventHandler[SpeechContinuousRecognitionSession, SpeechContinuousRecognitionResultGeneratedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_result_generated(self, value: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def auto_stop_silence_timeout(self) -> datetime.timedelta: ...
    @auto_stop_silence_timeout.setter
    def auto_stop_silence_timeout(self, value: datetime.timedelta) -> None: ...

class SpeechRecognitionCompilationResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionCompilationResult: ...
    @_property
    def status(self) -> SpeechRecognitionResultStatus: ...

class SpeechRecognitionGrammarFileConstraint(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionGrammarFileConstraint: ...
    @typing.overload
    def __new__(cls: typing.Type[SpeechRecognitionGrammarFileConstraint], file: typing.Optional[winrt.windows.storage.StorageFile]) -> SpeechRecognitionGrammarFileConstraint:...
    @typing.overload
    def __new__(cls: typing.Type[SpeechRecognitionGrammarFileConstraint], file: typing.Optional[winrt.windows.storage.StorageFile], tag: str) -> SpeechRecognitionGrammarFileConstraint:...
    @_property
    def tag(self) -> str: ...
    @tag.setter
    def tag(self, value: str) -> None: ...
    @_property
    def probability(self) -> SpeechRecognitionConstraintProbability: ...
    @probability.setter
    def probability(self, value: SpeechRecognitionConstraintProbability) -> None: ...
    @_property
    def is_enabled(self) -> bool: ...
    @is_enabled.setter
    def is_enabled(self, value: bool) -> None: ...
    @_property
    def type(self) -> SpeechRecognitionConstraintType: ...
    @_property
    def grammar_file(self) -> typing.Optional[winrt.windows.storage.StorageFile]: ...

class SpeechRecognitionHypothesis(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionHypothesis: ...
    @_property
    def text(self) -> str: ...

class SpeechRecognitionHypothesisGeneratedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionHypothesisGeneratedEventArgs: ...
    @_property
    def hypothesis(self) -> typing.Optional[SpeechRecognitionHypothesis]: ...

class SpeechRecognitionListConstraint(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionListConstraint: ...
    @typing.overload
    def __new__(cls: typing.Type[SpeechRecognitionListConstraint], commands: typing.Iterable[str]) -> SpeechRecognitionListConstraint:...
    @typing.overload
    def __new__(cls: typing.Type[SpeechRecognitionListConstraint], commands: typing.Iterable[str], tag: str) -> SpeechRecognitionListConstraint:...
    @_property
    def tag(self) -> str: ...
    @tag.setter
    def tag(self, value: str) -> None: ...
    @_property
    def probability(self) -> SpeechRecognitionConstraintProbability: ...
    @probability.setter
    def probability(self, value: SpeechRecognitionConstraintProbability) -> None: ...
    @_property
    def is_enabled(self) -> bool: ...
    @is_enabled.setter
    def is_enabled(self, value: bool) -> None: ...
    @_property
    def type(self) -> SpeechRecognitionConstraintType: ...
    @_property
    def commands(self) -> typing.Optional[winrt.windows.foundation.collections.IVector[str]]: ...

class SpeechRecognitionQualityDegradingEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionQualityDegradingEventArgs: ...
    @_property
    def problem(self) -> SpeechRecognitionAudioProblem: ...

class SpeechRecognitionResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionResult: ...
    def get_alternates(self, max_alternates: winrt.system.UInt32, /) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[SpeechRecognitionResult]]: ...
    @_property
    def confidence(self) -> SpeechRecognitionConfidence: ...
    @_property
    def constraint(self) -> typing.Optional[ISpeechRecognitionConstraint]: ...
    @_property
    def raw_confidence(self) -> winrt.system.Double: ...
    @_property
    def rule_path(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[str]]: ...
    @_property
    def semantic_interpretation(self) -> typing.Optional[SpeechRecognitionSemanticInterpretation]: ...
    @_property
    def status(self) -> SpeechRecognitionResultStatus: ...
    @_property
    def text(self) -> str: ...
    @_property
    def phrase_duration(self) -> datetime.timedelta: ...
    @_property
    def phrase_start_time(self) -> datetime.datetime: ...

class SpeechRecognitionSemanticInterpretation(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionSemanticInterpretation: ...
    @_property
    def properties(self) -> typing.Optional[winrt.windows.foundation.collections.IMapView[str, winrt.windows.foundation.collections.IVectorView[str]]]: ...

class SpeechRecognitionTopicConstraint(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionTopicConstraint: ...
    @typing.overload
    def __new__(cls: typing.Type[SpeechRecognitionTopicConstraint], scenario: SpeechRecognitionScenario, topic_hint: str) -> SpeechRecognitionTopicConstraint:...
    @typing.overload
    def __new__(cls: typing.Type[SpeechRecognitionTopicConstraint], scenario: SpeechRecognitionScenario, topic_hint: str, tag: str) -> SpeechRecognitionTopicConstraint:...
    @_property
    def tag(self) -> str: ...
    @tag.setter
    def tag(self, value: str) -> None: ...
    @_property
    def probability(self) -> SpeechRecognitionConstraintProbability: ...
    @probability.setter
    def probability(self, value: SpeechRecognitionConstraintProbability) -> None: ...
    @_property
    def is_enabled(self) -> bool: ...
    @is_enabled.setter
    def is_enabled(self, value: bool) -> None: ...
    @_property
    def type(self) -> SpeechRecognitionConstraintType: ...
    @_property
    def scenario(self) -> SpeechRecognitionScenario: ...
    @_property
    def topic_hint(self) -> str: ...

class SpeechRecognitionVoiceCommandDefinitionConstraint(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognitionVoiceCommandDefinitionConstraint: ...
    @_property
    def tag(self) -> str: ...
    @tag.setter
    def tag(self, value: str) -> None: ...
    @_property
    def probability(self) -> SpeechRecognitionConstraintProbability: ...
    @probability.setter
    def probability(self, value: SpeechRecognitionConstraintProbability) -> None: ...
    @_property
    def is_enabled(self) -> bool: ...
    @is_enabled.setter
    def is_enabled(self, value: bool) -> None: ...
    @_property
    def type(self) -> SpeechRecognitionConstraintType: ...

class SpeechRecognizer_Static(type):
    def try_set_system_speech_language_async(cls, speech_language: typing.Optional[winrt.windows.globalization.Language], /) -> winrt.windows.foundation.IAsyncOperation[bool]: ...
    @_property
    def supported_grammar_languages(cls) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[winrt.windows.globalization.Language]]: ...
    @_property
    def supported_topic_languages(cls) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[winrt.windows.globalization.Language]]: ...
    @_property
    def system_speech_language(cls) -> typing.Optional[winrt.windows.globalization.Language]: ...

class SpeechRecognizer(winrt.system.Object, metaclass=SpeechRecognizer_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognizer: ...
    @typing.overload
    def __new__(cls: typing.Type[SpeechRecognizer], language: typing.Optional[winrt.windows.globalization.Language]) -> SpeechRecognizer:...
    @typing.overload
    def __new__(cls: typing.Type[SpeechRecognizer]) -> SpeechRecognizer:...
    def close(self) -> None: ...
    def compile_constraints_async(self) -> winrt.windows.foundation.IAsyncOperation[SpeechRecognitionCompilationResult]: ...
    def recognize_async(self) -> winrt.windows.foundation.IAsyncOperation[SpeechRecognitionResult]: ...
    def recognize_with_u_i_async(self) -> winrt.windows.foundation.IAsyncOperation[SpeechRecognitionResult]: ...
    def stop_recognition_async(self) -> winrt.windows.foundation.IAsyncAction: ...
    def add_recognition_quality_degrading(self, speech_recognition_quality_degrading_handler: winrt.windows.foundation.TypedEventHandler[SpeechRecognizer, SpeechRecognitionQualityDegradingEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_recognition_quality_degrading(self, cookie: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_state_changed(self, state_changed_handler: winrt.windows.foundation.TypedEventHandler[SpeechRecognizer, SpeechRecognizerStateChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_state_changed(self, cookie: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_hypothesis_generated(self, value: winrt.windows.foundation.TypedEventHandler[SpeechRecognizer, SpeechRecognitionHypothesisGeneratedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_hypothesis_generated(self, value: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def constraints(self) -> typing.Optional[winrt.windows.foundation.collections.IVector[ISpeechRecognitionConstraint]]: ...
    @_property
    def current_language(self) -> typing.Optional[winrt.windows.globalization.Language]: ...
    @_property
    def timeouts(self) -> typing.Optional[SpeechRecognizerTimeouts]: ...
    @_property
    def u_i_options(self) -> typing.Optional[SpeechRecognizerUIOptions]: ...
    @_property
    def continuous_recognition_session(self) -> typing.Optional[SpeechContinuousRecognitionSession]: ...
    @_property
    def state(self) -> SpeechRecognizerState: ...

class SpeechRecognizerStateChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognizerStateChangedEventArgs: ...
    @_property
    def state(self) -> SpeechRecognizerState: ...

class SpeechRecognizerTimeouts(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognizerTimeouts: ...
    @_property
    def initial_silence_timeout(self) -> datetime.timedelta: ...
    @initial_silence_timeout.setter
    def initial_silence_timeout(self, value: datetime.timedelta) -> None: ...
    @_property
    def end_silence_timeout(self) -> datetime.timedelta: ...
    @end_silence_timeout.setter
    def end_silence_timeout(self, value: datetime.timedelta) -> None: ...
    @_property
    def babble_timeout(self) -> datetime.timedelta: ...
    @babble_timeout.setter
    def babble_timeout(self, value: datetime.timedelta) -> None: ...

class SpeechRecognizerUIOptions(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> SpeechRecognizerUIOptions: ...
    @_property
    def show_confirmation(self) -> bool: ...
    @show_confirmation.setter
    def show_confirmation(self, value: bool) -> None: ...
    @_property
    def is_read_back_enabled(self) -> bool: ...
    @is_read_back_enabled.setter
    def is_read_back_enabled(self, value: bool) -> None: ...
    @_property
    def example_text(self) -> str: ...
    @example_text.setter
    def example_text(self, value: str) -> None: ...
    @_property
    def audible_prompt(self) -> str: ...
    @audible_prompt.setter
    def audible_prompt(self, value: str) -> None: ...

class VoiceCommandManager_Static(type):
    def install_command_sets_from_storage_file_async(cls, file: typing.Optional[winrt.windows.storage.StorageFile], /) -> winrt.windows.foundation.IAsyncAction: ...
    @_property
    def installed_command_sets(cls) -> typing.Optional[winrt.windows.foundation.collections.IMapView[str, VoiceCommandSet]]: ...

class VoiceCommandManager(winrt.system.Object, metaclass=VoiceCommandManager_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> VoiceCommandManager: ...

class VoiceCommandSet(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> VoiceCommandSet: ...
    def set_phrase_list_async(self, phrase_list_name: str, phrase_list: typing.Iterable[str], /) -> winrt.windows.foundation.IAsyncAction: ...
    @_property
    def language(self) -> str: ...
    @_property
    def name(self) -> str: ...

class ISpeechRecognitionConstraint(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> ISpeechRecognitionConstraint: ...
    @_property
    def is_enabled(self) -> bool: ...
    @is_enabled.setter
    def is_enabled(self, value: bool) -> None: ...
    @_property
    def probability(self) -> SpeechRecognitionConstraintProbability: ...
    @probability.setter
    def probability(self, value: SpeechRecognitionConstraintProbability) -> None: ...
    @_property
    def tag(self) -> str: ...
    @tag.setter
    def tag(self, value: str) -> None: ...
    @_property
    def type(self) -> SpeechRecognitionConstraintType: ...

