类 AsyncRecognizer

class AsyncRecognizer
  : public Recognizer

AsyncRecognizer 抽象基类。

成员

SessionStarted

语法: public EventSignal< constSessionEventArgs & > SessionStarted;

指示识别会话开始 (操作) 的事件的信号。

SessionStopped

语法: public EventSignal< constSessionEventArgs & > SessionStopped;

指示识别会话结束 (操作) 的事件的信号。

SpeechStartDetected

语法: public EventSignal< constRecognitionEventArgs & > SpeechStartDetected;

指示语音开始的事件的信号。

SpeechEndDetected

语法: public EventSignal< constRecognitionEventArgs & > SpeechEndDetected;

指示语音结束的事件的信号。

识别

语法: public EventSignal< constRecoEventArgs & > Recognizing;

包含中间识别结果的事件的信号。

认可

语法: public EventSignal< constRecoEventArgs & > Recognized;

包含最终识别结果的事件的信号。 (指示) 成功识别尝试。

已取消

语法: public EventSignal< constRecoCanceledEventArgs & > Canceled;

包含已取消识别结果的事件的信号 (指示因结果或直接取消请求而取消的识别尝试,或者指示传输或协议失败) 。

RecognizeOnceAsync

语法: public std::future< std::shared_ptr< RecoResult > > RecognizeOnceAsync ( );

在非阻塞 (异步) 模式下执行识别。

返回

包含结果值的未来 (指向异步识别的 RecoResult) 的共享指针。

StartContinuousRecognitionAsync

语法: public std::future< void > StartContinuousRecognitionAsync ( );

异步启动连续识别操作。

返回

一个空的未来。

StopContinuousRecognitionAsync

语法: public std::future< void > StopContinuousRecognitionAsync ( );

异步终止正在进行的连续识别操作。

返回

一个空的未来。

StartKeywordRecognitionAsync

语法: public std::future< void > StartKeywordRecognitionAsync ( std::shared_ptr< KeywordRecognitionModel > model );

异步启动关键字 (keyword) 识别操作。

参数

  • model指定要识别关键字 (keyword) 的关键字 (keyword) 识别模型。

返回

启动关键字 (keyword) 识别的异步操作。

StopKeywordRecognitionAsync

语法: public std::future< void > StopKeywordRecognitionAsync ( );

异步终止正在进行的关键字 (keyword) 识别操作。

返回

一个空的未来。