[PATCH v2 4/5] include/windows.media.speechrecognition.idl: Add SpeechRecognizerStateChangedEventArgs.

Rémi Bernon rbernon at codeweavers.com
Tue Mar 1 10:42:39 CST 2022


From: Bernhard Kölbl <besentv at gmail.com>

And a needed enum.

Signed-off-by: Bernhard Kölbl <besentv at gmail.com>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.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 87e8d4c7bf5..b0c0f864b22 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)
-- 
2.34.1




More information about the wine-devel mailing list