NUGU SDK Linux  1.7.6
NuguCapability::IASRListener Class Referenceabstract

ASR listener interface. More...

#include <asr_interface.hh>

+ Inheritance diagram for NuguCapability::IASRListener:
+ Collaboration diagram for NuguCapability::IASRListener:

Public Member Functions

virtual void onCancel (const std::string &dialog_id)=0
 Speech recognition is canceled. More...
 
virtual void onComplete (const std::string &text, const std::string &dialog_id)=0
 Speech recognition results which are reported naturally in situations based on the entire speech. More...
 
virtual void onError (ASRError error, const std::string &dialog_id, bool listen_timeout_fail_beep=true)=0
 Report an error occurred during speech recognition to the user. More...
 
virtual void onNone (const std::string &dialog_id)=0
 No speech recognition results. More...
 
virtual void onPartial (const std::string &text, const std::string &dialog_id)=0
 The result of recognizing the user's speech in real time. More...
 
virtual void onState (ASRState state, const std::string &dialog_id, ASRInitiator initiator)=0
 Report to the user asr state changed. More...
 
- Public Member Functions inherited from NuguClientKit::ICapabilityListener
virtual ICapabilityInterfacegetCapabilityHandler ()
 Get capability interface object. More...
 
virtual void setCapabilityHandler (ICapabilityInterface *handler)
 Set capability interface object. More...
 

Detailed Description

ASR listener interface.

See also
IASRHandler

Member Function Documentation

◆ onState()

virtual void NuguCapability::IASRListener::onState ( ASRState  state,
const std::string &  dialog_id,
ASRInitiator  initiator 
)
pure virtual

Report to the user asr state changed.

Parameters
[in]stateasr state
[in]dialog_iddialog request id
[in]initiatorasr initiator
See also
IASRHandler::startRecognition()
IASRHandler::stopRecognition()

◆ onNone()

virtual void NuguCapability::IASRListener::onNone ( const std::string &  dialog_id)
pure virtual

No speech recognition results.

Parameters
[in]dialog_iddialog request id

◆ onPartial()

virtual void NuguCapability::IASRListener::onPartial ( const std::string &  text,
const std::string &  dialog_id 
)
pure virtual

The result of recognizing the user's speech in real time.

Parameters
[in]textSpeech recognition result
[in]dialog_iddialog request id

◆ onComplete()

virtual void NuguCapability::IASRListener::onComplete ( const std::string &  text,
const std::string &  dialog_id 
)
pure virtual

Speech recognition results which are reported naturally in situations based on the entire speech.

Parameters
[in]textSpeech recognition result
[in]dialog_iddialog request id

◆ onError()

virtual void NuguCapability::IASRListener::onError ( ASRError  error,
const std::string &  dialog_id,
bool  listen_timeout_fail_beep = true 
)
pure virtual

Report an error occurred during speech recognition to the user.

Parameters
[in]errorASR error
[in]dialog_iddialog request id
[in]listen_timeout_fail_beepwhether to play fail beep or not when listen-timeout occurred

◆ onCancel()

virtual void NuguCapability::IASRListener::onCancel ( const std::string &  dialog_id)
pure virtual

Speech recognition is canceled.

Parameters
[in]dialog_iddialog request id

The documentation for this class was generated from the following file: