AsyncRecognizer 类
class AsyncRecognizer
: public Recognizer
AsyncRecognizer 抽象基类。
成员
SessionStarted
语法:public EventSignal< const SessionEventArgs & > SessionStarted;
指示识别会话(作)开始的事件的信号。
SessionStopped
语法:public EventSignal< const SessionEventArgs & > SessionStopped;
指示识别会话结束(作)的事件信号。
SpeechStartDetected
语法:public EventSignal< const RecognitionEventArgs & > SpeechStartDetected;
指示语音开始的事件的信号。
SpeechEndDetected
语法:public EventSignal< const RecognitionEventArgs & > SpeechEndDetected;
指示语音结束的事件的信号。
识别
语法:public EventSignal< const RecoEventArgs & > Recognizing;
包含中间识别结果的事件的信号。
已确认
语法:public EventSignal< const RecoEventArgs & > Recognized;
包含最终识别结果的事件的信号。 (指示成功识别尝试)。
取消
语法:public EventSignal< const RecoCanceledEventArgs & > 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 );
异步启动关键字识别操作。
参数
-
model
指定要识别的关键字的关键字识别模型。
退货
启动关键字识别的异步操作。
StopKeywordRecognitionAsync
语法:public std::future< void > StopKeywordRecognitionAsync ( );
异步终止正在进行的关键字识别作。
退货
空的未来。