/// Asynchronously initiates keyword recognition operation.
Asynchronously initiates keyword recognition operation.
Asynchronously initiates keyword recognition operation .
pub async fn start_keyword_recognition_async(
        &mut self,
        model: KeywordRecognitionModel,
    ) -> Result<()> {
        unsafe {
            let mut handle_async_start_keyword: SPXASYNCHANDLE =
                MaybeUninit::uninit().assume_init();
            let mut ret = recognizer_start_keyword_recognition_async(
                self.handle.inner(),
                model.handle.inner(),
                &mut handle_async_start_keyword,
            );
            convert_err(
                ret,
                "SpeechRecognizer.recognizer_start_keyword_recognition_async error",
            )?;
            self.handle_async_start_keyword = Some(SmartHandle::create(
                "handle_async_start_keyword",
                handle_async_start_keyword,
                recognizer_async_handle_release,
            ));
            ret = recognizer_start_keyword_recognition_async_wait_for(
                handle_async_start_keyword,
                u32::MAX,
            );
            convert_err(
                ret,
                "SpeechRecognizer.recognizer_start_keyword_recognition_async_wait_for error",
            )?;
        }
        Ok(())
    }
pub async fn start_keyword_recognition_async ( & mut self , model : KeywordRecognitionModel , ) -> Result < ( ) > { unsafe { let mut handle_async_start_keyword : SPXASYNCHANDLE = MaybeUninit :: uninit ( ) . assume_init ( ) ; let mut ret = recognizer_start_keyword_recognition_async ( self . handle . inner ( ) , model . handle . inner ( ) , & mut handle_async_start_keyword , ) ; convert_err ( ret , " " , ) ? ; self . handle_async_start_keyword = Some ( SmartHandle :: create ( " " , handle_async_start_keyword , recognizer_async_handle_release , ) ) ; ret = recognizer_start_keyword_recognition_async_wait_for ( handle_async_start_keyword , u32 :: MAX , ) ; convert_err ( ret , " " , ) ? ; } Ok ( ( ) ) }
Asynchronously initiates keyword recognition operation.
Asynchronously initiates keyword recognition operation .
&mut self
model
KeywordRecognitionModel