Signed-off-by: Bernhard Kölbl besentv@gmail.com --- include/windows.media.speechrecognition.idl | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/include/windows.media.speechrecognition.idl b/include/windows.media.speechrecognition.idl index ebcd579865d..9c288ce4066 100644 --- a/include/windows.media.speechrecognition.idl +++ b/include/windows.media.speechrecognition.idl @@ -47,6 +47,7 @@ namespace Windows { interface ISpeechRecognitionResult2; interface ISpeechRecognitionSemanticInterpretation; interface ISpeechRecognizerTimeouts; + interface ISpeechRecognizerUIOptions; runtimeclass SpeechContinuousRecognitionCompletedEventArgs; runtimeclass SpeechContinuousRecognitionResultGeneratedEventArgs; runtimeclass SpeechContinuousRecognitionSession; @@ -55,6 +56,7 @@ namespace Windows { runtimeclass SpeechRecognitionResult; runtimeclass SpeechRecognitionSemanticInterpretation; runtimeclass SpeechRecognizerTimeouts; + runtimeclass SpeechRecognizerUIOptions; } } } @@ -263,6 +265,23 @@ namespace Windows { [propput] HRESULT BabbleTimeout([in] Windows.Foundation.TimeSpan value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizerUIOptions), + uuid(7888d641-b92b-44ba-a25f-d1864630641f) + ] + interface ISpeechRecognizerUIOptions : IInspectable + { + [propget] HRESULT ExampleText([out, retval] HSTRING *value); + [propput] HRESULT ExampleText([in] HSTRING value); + [propget] HRESULT AudiblePrompt([out, retval] HSTRING *value); + [propput] HRESULT AudiblePrompt([in] HSTRING value); + [propget] HRESULT IsReadBackEnabled([out, retval] boolean *value); + [propput] HRESULT IsReadBackEnabled([in] boolean value); + [propget] HRESULT ShowConfirmation([out, retval] boolean *value); + [propput] HRESULT ShowConfirmation([in] boolean value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -340,6 +359,15 @@ namespace Windows { { [default] interface Windows.Media.SpeechRecognition.ISpeechRecognizerTimeouts; } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass SpeechRecognizerUIOptions + { + [default] interface Windows.Media.SpeechRecognition.ISpeechRecognizerUIOptions; + } } } }
Signed-off-by: Bernhard Kölbl besentv@gmail.com --- include/windows.media.speechrecognition.idl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/include/windows.media.speechrecognition.idl b/include/windows.media.speechrecognition.idl index 9c288ce4066..c9e1305fcac 100644 --- a/include/windows.media.speechrecognition.idl +++ b/include/windows.media.speechrecognition.idl @@ -40,6 +40,7 @@ namespace Windows { interface ISpeechContinuousRecognitionCompletedEventArgs; interface ISpeechContinuousRecognitionResultGeneratedEventArgs; interface ISpeechContinuousRecognitionSession; + interface ISpeechRecognitionCompilationResult; interface ISpeechRecognitionConstraint; interface ISpeechRecognitionHypothesis; interface ISpeechRecognitionHypothesisGeneratedEventArgs; @@ -51,6 +52,7 @@ namespace Windows { runtimeclass SpeechContinuousRecognitionCompletedEventArgs; runtimeclass SpeechContinuousRecognitionResultGeneratedEventArgs; runtimeclass SpeechContinuousRecognitionSession; + runtimeclass SpeechRecognitionCompilationResult; runtimeclass SpeechRecognitionHypothesis; runtimeclass SpeechRecognitionHypothesisGeneratedEventArgs; runtimeclass SpeechRecognitionResult; @@ -177,6 +179,16 @@ namespace Windows { [eventremove] HRESULT ResultGenerated([in] EventRegistrationToken token); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognitionCompilationResult), + uuid(407e6c5d-6ac7-4da4-9cc1-2fce32cf7489) + ] + interface ISpeechRecognitionCompilationResult : IInspectable + { + [propget] HRESULT Status([out, retval] Windows.Media.SpeechRecognition.SpeechRecognitionResultStatus *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), uuid(79ac1628-4d68-43c4-8911-40dc4101b55b) @@ -312,6 +324,15 @@ namespace Windows { [default] interface Windows.Media.SpeechRecognition.ISpeechContinuousRecognitionSession; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass SpeechRecognitionCompilationResult + { + [default] interface Windows.Media.SpeechRecognition.ISpeechRecognitionCompilationResult; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile),
And a needed enum.
Signed-off-by: Bernhard Kölbl besentv@gmail.com --- include/windows.media.speechrecognition.idl | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+)
diff --git a/include/windows.media.speechrecognition.idl b/include/windows.media.speechrecognition.idl index c9e1305fcac..5e4d0adbd4e 100644 --- a/include/windows.media.speechrecognition.idl +++ b/include/windows.media.speechrecognition.idl @@ -33,6 +33,7 @@ namespace Windows { namespace Media { namespace SpeechRecognition { typedef enum SpeechContinuousRecognitionMode SpeechContinuousRecognitionMode; + typedef enum SpeechRecognitionAudioProblem SpeechRecognitionAudioProblem; typedef enum SpeechRecognitionConfidence SpeechRecognitionConfidence; typedef enum SpeechRecognitionConstraintProbability SpeechRecognitionConstraintProbability; typedef enum SpeechRecognitionConstraintType SpeechRecognitionConstraintType; @@ -44,6 +45,7 @@ namespace Windows { interface ISpeechRecognitionConstraint; interface ISpeechRecognitionHypothesis; interface ISpeechRecognitionHypothesisGeneratedEventArgs; + interface ISpeechRecognitionQualityDegradingEventArgs; interface ISpeechRecognitionResult; interface ISpeechRecognitionResult2; interface ISpeechRecognitionSemanticInterpretation; @@ -55,6 +57,7 @@ namespace Windows { runtimeclass SpeechRecognitionCompilationResult; runtimeclass SpeechRecognitionHypothesis; runtimeclass SpeechRecognitionHypothesisGeneratedEventArgs; + runtimeclass SpeechRecognitionQualityDegradingEventArgs; runtimeclass SpeechRecognitionResult; runtimeclass SpeechRecognitionSemanticInterpretation; runtimeclass SpeechRecognizerTimeouts; @@ -88,6 +91,18 @@ namespace Windows { PauseOnRecognition = 1, };
+ [contract(Windows.Foundation.UniversalApiContract, 1.0)] + enum SpeechRecognitionAudioProblem + { + None = 0, + TooNoisy = 1, + NoSignal = 2, + TooLoud = 3, + TooQuiet = 4, + TooFast = 5, + TooSlow = 6, + }; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] enum SpeechRecognitionConfidence { @@ -224,6 +239,16 @@ namespace Windows { [propget] HRESULT Hypothesis([out, retval] Windows.Media.SpeechRecognition.SpeechRecognitionHypothesis **value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognitionQualityDegradingEventArgs), + uuid(4fe24105-8c3a-4c7e-8d0a-5bd4f5b14ad8) + ] + interface ISpeechRecognitionQualityDegradingEventArgs : IInspectable + { + [propget] HRESULT Problem([out, retval] Windows.Media.SpeechRecognition.SpeechRecognitionAudioProblem **value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognitionResult), @@ -353,6 +378,15 @@ namespace Windows { [default] interface Windows.Media.SpeechRecognition.ISpeechRecognitionHypothesisGeneratedEventArgs; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass SpeechRecognitionQualityDegradingEventArgs + { + [default] interface Windows.Media.SpeechRecognition.ISpeechRecognitionQualityDegradingEventArgs; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile)
And a needed enum.
Signed-off-by: Bernhard Kölbl besentv@gmail.com --- include/windows.media.speechrecognition.idl | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+)
diff --git a/include/windows.media.speechrecognition.idl b/include/windows.media.speechrecognition.idl index 5e4d0adbd4e..5e15390ef56 100644 --- a/include/windows.media.speechrecognition.idl +++ b/include/windows.media.speechrecognition.idl @@ -38,6 +38,7 @@ namespace Windows { typedef enum SpeechRecognitionConstraintProbability SpeechRecognitionConstraintProbability; typedef enum SpeechRecognitionConstraintType SpeechRecognitionConstraintType; typedef enum SpeechRecognitionResultStatus SpeechRecognitionResultStatus; + typedef enum SpeechRecognizerState SpeechRecognizerState; interface ISpeechContinuousRecognitionCompletedEventArgs; interface ISpeechContinuousRecognitionResultGeneratedEventArgs; interface ISpeechContinuousRecognitionSession; @@ -49,6 +50,7 @@ namespace Windows { interface ISpeechRecognitionResult; interface ISpeechRecognitionResult2; interface ISpeechRecognitionSemanticInterpretation; + interface ISpeechRecognizerStateChangedEventArgs; interface ISpeechRecognizerTimeouts; interface ISpeechRecognizerUIOptions; runtimeclass SpeechContinuousRecognitionCompletedEventArgs; @@ -60,6 +62,7 @@ namespace Windows { runtimeclass SpeechRecognitionQualityDegradingEventArgs; runtimeclass SpeechRecognitionResult; runtimeclass SpeechRecognitionSemanticInterpretation; + runtimeclass SpeechRecognizerStateChangedEventArgs; runtimeclass SpeechRecognizerTimeouts; runtimeclass SpeechRecognizerUIOptions; } @@ -149,6 +152,20 @@ namespace Windows { MicrophoneUnavailable = 10, };
+ [contract(Windows.Foundation.UniversalApiContract, 1.0)] + enum SpeechRecognizerState + { + Idle = 0, + Capturing = 1, + Processing = 2, + SoundStarted = 3, + SoundEnded = 4, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + SpeechDetected = 5, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + Paused = 6, + }; + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Media.SpeechRecognition.SpeechContinuousRecognitionCompletedEventArgs), @@ -287,6 +304,16 @@ namespace Windows { [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING>*> **value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizerStateChangedEventArgs), + uuid(563d4f09-ba03-4bad-ad81-ddc6c4dab0c3) + ] + interface ISpeechRecognizerStateChangedEventArgs : IInspectable + { + [propget] HRESULT State([out, retval] Windows.Media.SpeechRecognition.SpeechRecognizerState *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizerTimeouts), @@ -406,6 +433,15 @@ namespace Windows { [default] interface Windows.Media.SpeechRecognition.ISpeechRecognitionSemanticInterpretation; }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass SpeechRecognizerStateChangedEventArgs + { + [default] interface Windows.Media.SpeechRecognition.ISpeechRecognizerStateChangedEventArgs; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile)
And it's dependencies.
Signed-off-by: Bernhard Kölbl besentv@gmail.com --- include/windows.media.speechrecognition.idl | 112 ++++++++++++++++++++ 1 file changed, 112 insertions(+)
diff --git a/include/windows.media.speechrecognition.idl b/include/windows.media.speechrecognition.idl index 5e15390ef56..27a51b2410c 100644 --- a/include/windows.media.speechrecognition.idl +++ b/include/windows.media.speechrecognition.idl @@ -50,7 +50,12 @@ namespace Windows { interface ISpeechRecognitionResult; interface ISpeechRecognitionResult2; interface ISpeechRecognitionSemanticInterpretation; + interface ISpeechRecognizer; + interface ISpeechRecognizer2; + interface ISpeechRecognizerFactory; interface ISpeechRecognizerStateChangedEventArgs; + interface ISpeechRecognizerStatics; + interface ISpeechRecognizerStatics2; interface ISpeechRecognizerTimeouts; interface ISpeechRecognizerUIOptions; runtimeclass SpeechContinuousRecognitionCompletedEventArgs; @@ -62,6 +67,7 @@ namespace Windows { runtimeclass SpeechRecognitionQualityDegradingEventArgs; runtimeclass SpeechRecognitionResult; runtimeclass SpeechRecognitionSemanticInterpretation; + runtimeclass SpeechRecognizer; runtimeclass SpeechRecognizerStateChangedEventArgs; runtimeclass SpeechRecognizerTimeouts; runtimeclass SpeechRecognizerUIOptions; @@ -73,11 +79,22 @@ namespace Windows { namespace Media { namespace SpeechRecognition { declare { + interface Windows.Foundation.Collections.IIterable<Windows.Media.SpeechRecognition.ISpeechRecognitionConstraint*>; + interface Windows.Foundation.Collections.IIterator<Windows.Media.SpeechRecognition.ISpeechRecognitionConstraint*>; + interface Windows.Foundation.Collections.IVectorView<Windows.Media.SpeechRecognition.ISpeechRecognitionConstraint*>; + interface Windows.Foundation.Collections.IVector<Windows.Media.SpeechRecognition.ISpeechRecognitionConstraint*>; interface Windows.Foundation.Collections.IIterable<Windows.Media.SpeechRecognition.SpeechRecognitionResult*>; interface Windows.Foundation.Collections.IIterator<Windows.Media.SpeechRecognition.SpeechRecognitionResult*>; interface Windows.Foundation.Collections.IVectorView<Windows.Media.SpeechRecognition.SpeechRecognitionResult*>; + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Media.SpeechRecognition.SpeechRecognitionCompilationResult*>; + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Media.SpeechRecognition.SpeechRecognitionResult*>; + interface Windows.Foundation.IAsyncOperation<Windows.Media.SpeechRecognition.SpeechRecognitionCompilationResult*>; + interface Windows.Foundation.IAsyncOperation<Windows.Media.SpeechRecognition.SpeechRecognitionResult*>; interface Windows.Foundation.TypedEventHandler<Windows.Media.SpeechRecognition.SpeechContinuousRecognitionSession*, Windows.Media.SpeechRecognition.SpeechContinuousRecognitionCompletedEventArgs*>; interface Windows.Foundation.TypedEventHandler<Windows.Media.SpeechRecognition.SpeechContinuousRecognitionSession*, Windows.Media.SpeechRecognition.SpeechContinuousRecognitionResultGeneratedEventArgs*>; + interface Windows.Foundation.TypedEventHandler<Windows.Media.SpeechRecognition.SpeechRecognizer*, Windows.Media.SpeechRecognition.SpeechRecognitionHypothesisGeneratedEventArgs*>; + interface Windows.Foundation.TypedEventHandler<Windows.Media.SpeechRecognition.SpeechRecognizer*, Windows.Media.SpeechRecognition.SpeechRecognitionQualityDegradingEventArgs*>; + interface Windows.Foundation.TypedEventHandler<Windows.Media.SpeechRecognition.SpeechRecognizer*, Windows.Media.SpeechRecognition.SpeechRecognizerStateChangedEventArgs*>; } } } @@ -304,6 +321,64 @@ namespace Windows { [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING>*> **value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizer), + uuid(0bc3c9cb-c26a-40f2-aeb5-8096b2e48073) + ] + interface ISpeechRecognizer : IInspectable + requires + Windows.Foundation.IClosable + { + [propget] HRESULT CurrentLanguage([out, retval] Windows.Globalization.Language **value); + [propget] HRESULT Constraints([out, retval] Windows.Foundation.Collections.IVector<Windows.Media.SpeechRecognition.ISpeechRecognitionConstraint*> **value); + [propget] HRESULT Timeouts([out, retval] Windows.Media.SpeechRecognition.SpeechRecognizerTimeouts **value); + [propget] HRESULT UIOptions([out, retval] Windows.Media.SpeechRecognition.SpeechRecognizerUIOptions **value); + HRESULT CompileConstraintsAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Media.SpeechRecognition.SpeechRecognitionCompilationResult*> **operation); + HRESULT RecognizeAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Media.SpeechRecognition.SpeechRecognitionResult*> **operation); + HRESULT RecognizeWithUIAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Media.SpeechRecognition.SpeechRecognitionResult*> **operation); + [eventadd] HRESULT RecognitionQualityDegrading( + [in] Windows.Foundation.TypedEventHandler<Windows.Media.SpeechRecognition.SpeechRecognizer*, Windows.Media.SpeechRecognition.SpeechRecognitionQualityDegradingEventArgs*> *handler, + [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT RecognitionQualityDegrading( + [in] EventRegistrationToken token); + [eventadd] HRESULT StateChanged( + [in] + Windows.Foundation.TypedEventHandler<Windows.Media.SpeechRecognition.SpeechRecognizer*, Windows.Media.SpeechRecognition.SpeechRecognizerStateChangedEventArgs*> *handler, + [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT StateChanged( + [in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizer), + uuid(63c9baf1-91e3-4ea4-86a1-7c3867d084a6) + ] + interface ISpeechRecognizer2 : IInspectable + { + [propget] HRESULT ContinuousRecognitionSession([out, retval] Windows.Media.SpeechRecognition.SpeechContinuousRecognitionSession **value); + [propget] HRESULT State([out, retval] Windows.Media.SpeechRecognition.SpeechRecognizerState *value); + HRESULT StopRecognitionAsync([out, retval] Windows.Foundation.IAsyncAction **action); + [eventadd] HRESULT HypothesisGenerated( + [in] Windows.Foundation.TypedEventHandler<Windows.Media.SpeechRecognition.SpeechRecognizer*, Windows.Media.SpeechRecognition.SpeechRecognitionHypothesisGeneratedEventArgs*> *handler, + [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT HypothesisGenerated( + [in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizer), + uuid(60c488dd-7fb8-4033-ac70-d046f64818e1) + ] + interface ISpeechRecognizerFactory : IInspectable + { + HRESULT Create( + [in] Windows.Globalization.Language *language, + [out, retval] Windows.Media.SpeechRecognition.SpeechRecognizer **speechrecognizer); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizerStateChangedEventArgs), @@ -314,6 +389,28 @@ namespace Windows { [propget] HRESULT State([out, retval] Windows.Media.SpeechRecognition.SpeechRecognizerState *value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizer), + uuid(87a35eac-a7dc-4b0b-bcc9-24f47c0b7ebf) + ] + interface ISpeechRecognizerStatics : IInspectable + { + [propget] HRESULT SystemSpeechLanguage([out, retval] Windows.Globalization.Language **language); + [propget] HRESULT SupportedTopicLanguages([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Globalization.Language*> **languages); + [propget] HRESULT SupportedGrammarLanguages([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Globalization.Language*> **languages); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 5.0), + exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizer), + uuid(1d1b0d95-7565-4ef9-a2f3-ba15162a96cf) + ] + interface ISpeechRecognizerStatics2 : IInspectable + { + HRESULT TrySetSystemSpeechLanguageAsync([in] Windows.Globalization.Language *language, [out, retval] Windows.Foundation.IAsyncOperation<boolean> **operation); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Media.SpeechRecognition.SpeechRecognizerTimeouts), @@ -433,6 +530,21 @@ namespace Windows { [default] interface Windows.Media.SpeechRecognition.ISpeechRecognitionSemanticInterpretation; }
+ [ + activatable(Windows.Foundation.UniversalApiContract, 1.0), + activatable(Windows.Media.SpeechRecognition.ISpeechRecognizerFactory, Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.Media.SpeechRecognition.ISpeechRecognizerStatics, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.Media.SpeechRecognition.ISpeechRecognizerStatics2, Windows.Foundation.UniversalApiContract, 5.0) + ] + runtimeclass SpeechRecognizer + { + [default] interface Windows.Media.SpeechRecognition.ISpeechRecognizer; + interface Windows.Foundation.IClosable; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Media.SpeechRecognition.ISpeechRecognizer2; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile)