NUGU SDK Linux  1.7.6
NuguCapability::ITTSHandler Class Referenceabstract

tts handler interface More...

#include <tts_interface.hh>

+ Inheritance diagram for NuguCapability::ITTSHandler:
+ Collaboration diagram for NuguCapability::ITTSHandler:

Public Member Functions

virtual void addListener (ITTSListener *listener)=0
 Add the ITTSListener object. More...
 
virtual std::string getPlayServiceId ()=0
 Get current play service id. More...
 
virtual void removeListener (ITTSListener *listener)=0
 Remove the ITTSListener object. More...
 
virtual std::string requestTTS (const std::string &text, const std::string &play_service_id, const std::string &referrer_id="")=0
 request the sentence to speech. More...
 
virtual void setAttribute (TTSAttribute &&attribute)=0
 Set attribute about speech synthesizer. More...
 
virtual bool setMute (bool mute)=0
 set pcm player's mute More...
 
virtual bool setVolume (int volume)=0
 set pcm player's volume More...
 
virtual void stopTTS ()=0
 Stop currently speech.
 
- Public Member Functions inherited from NuguClientKit::ICapabilityInterface
virtual void addEventResultCallback (const std::string &ename, EventResultCallback callback)=0
 Add event result callback for error handling. More...
 
virtual void cancelDirective (NuguDirective *ndir)=0
 Receive a directive cancellation from the Directive sequencer. More...
 
virtual void deInitialize ()=0
 Deinitialize the current object.
 
virtual std::string getName ()=0
 Get the capability name of the current object. More...
 
virtual bool getProperties (const std::string &property, std::list< std::string > &values)=0
 It is possible to share own property values among objects. More...
 
virtual bool getProperty (const std::string &property, std::string &value)=0
 It is possible to share own property value among objects. More...
 
virtual std::string getVersion ()=0
 Get the capability version of the current object. More...
 
virtual void initialize ()=0
 Initialize the current object.
 
virtual void notifyEventResponse (const std::string &msg_id, const std::string &data, bool success)=0
 Notify event response info. More...
 
virtual void notifyEventResult (const std::string &event_desc)=0
 Notify event result. More...
 
virtual void preprocessDirective (NuguDirective *ndir)=0
 Receive a directive preprocessing request from Directive sequencer. More...
 
virtual void processDirective (NuguDirective *ndir)=0
 Receive a directive processing request from Directive sequencer. More...
 
virtual bool receiveCommand (const std::string &from, const std::string &command, const std::string &param)=0
 Process command from other objects. More...
 
virtual void receiveCommandAll (const std::string &command, const std::string &param)=0
 Process command received from capability manager. More...
 
virtual void removeEventResultCallback (const std::string &ename)=0
 Remove event result callback. More...
 
virtual void restore ()=0
 Restore previous suspended action.
 
virtual void setCancelPolicy (bool cancel_previous_dialog, DirectiveCancelPolicy &&cancel_policy={ true })=0
 Set directive cancel policy. More...
 
virtual void setCapabilityListener (ICapabilityListener *clistener)=0
 Set the listener object. More...
 
virtual void setNuguCoreContainer (INuguCoreContainer *core_container)=0
 Set INuguCoreContainer for using functions in NuguCore. More...
 
virtual void setSuspendPolicy (SuspendPolicy policy=SuspendPolicy::STOP)=0
 Set capability suspend policy. More...
 
virtual void suspend ()=0
 Suspend current action.
 
virtual void updateCompactContext (NJson::Value &ctx)=0
 Update the compact context information of the capability agent. More...
 
virtual void updateInfoForContext (NJson::Value &ctx)=0
 Update the current context information of the capability agent. More...
 

Additional Inherited Members

- Public Types inherited from NuguClientKit::ICapabilityInterface
using EventResultCallback = std::function< void(const std::string &, const std::string &, const std::string &, int, int)>
 Event result callback for error handling. More...
 
enum class  SuspendPolicy { STOP , PAUSE }
 Capability suspend policy. More...
 

Detailed Description

tts handler interface

See also
ITTSListener

Member Function Documentation

◆ addListener()

virtual void NuguCapability::ITTSHandler::addListener ( ITTSListener listener)
pure virtual

Add the ITTSListener object.

Parameters
[in]listenerITTSListener object

◆ removeListener()

virtual void NuguCapability::ITTSHandler::removeListener ( ITTSListener listener)
pure virtual

Remove the ITTSListener object.

Parameters
[in]listenerITTSListener object

◆ requestTTS()

virtual std::string NuguCapability::ITTSHandler::requestTTS ( const std::string &  text,
const std::string &  play_service_id,
const std::string &  referrer_id = "" 
)
pure virtual

request the sentence to speech.

Parameters
[in]textsentence
[in]play_service_idreceived from server
[in]referrer_idreferrer request dialog id for analysis

◆ setVolume()

virtual bool NuguCapability::ITTSHandler::setVolume ( int  volume)
pure virtual

set pcm player's volume

Parameters
[in]volumevolume level
Returns
result of set volume

◆ setMute()

virtual bool NuguCapability::ITTSHandler::setMute ( bool  mute)
pure virtual

set pcm player's mute

Parameters
[in]mutevolume mute
Returns
result of set mute

◆ setAttribute()

virtual void NuguCapability::ITTSHandler::setAttribute ( TTSAttribute &&  attribute)
pure virtual

Set attribute about speech synthesizer.

Parameters
[in]attributeattribute object

◆ getPlayServiceId()

virtual std::string NuguCapability::ITTSHandler::getPlayServiceId ( )
pure virtual

Get current play service id.

Returns
play service id

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