On Mon Jan 16 16:20:40 2023 +0000, Jinoh Kang wrote:
From https://learn.microsoft.com/en-us/uwp/api/windows.media.speechrecognition.sp...:
**Idle**: 0
Indicates that speech recognition is not active and the speech
recognizer is not capturing (listening for) audio input.
In this state, [SpeechRecognizer.RecognizeAsync],
[SpeechRecognizer.RecognizeWithUIAsync], **[SpeechContinuousRecognitionSession.StartAsync]**, or [SpeechRecognizer.CompileConstraintsAsync] can be called. (emphasis mine) A successful call to `StartAsync` requires that `worker_running` is true as a precondition. However, the `get_State` implementation returns `recognizer_state` as-is. Therefore, `worker_running && recognizer_state == SpeechRecognizerState_Idle` is an invalid state combination. Something like the following would make more sense:
impl->recognizer_state = SpeechRecognizerState_Capturing;
Yes, that's a mistake.