YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
SpeechSynthesizer_nwc_yarp Class Reference

speechSynthesizer_nwc_yarp: A network wrapper client that connects to a speechSynthesizer_nws_yarp to perform speech synthesis. More...

#include <networkWrappers/speechSynthesizer_nwc_yarp/SpeechSynthesizer_nwc_yarp.h>

+ Inheritance diagram for SpeechSynthesizer_nwc_yarp:

Public Member Functions

 SpeechSynthesizer_nwc_yarp ()=default
 
 SpeechSynthesizer_nwc_yarp (const SpeechSynthesizer_nwc_yarp &)=delete
 
 SpeechSynthesizer_nwc_yarp (SpeechSynthesizer_nwc_yarp &&)=delete
 
SpeechSynthesizer_nwc_yarpoperator= (const SpeechSynthesizer_nwc_yarp &)=delete
 
SpeechSynthesizer_nwc_yarpoperator= (SpeechSynthesizer_nwc_yarp &&)=delete
 
 ~SpeechSynthesizer_nwc_yarp () override
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
bool setLanguage (const std::string &language="auto") override
 Sets the language for speech synthesis.
 
bool getLanguage (std::string &language) override
 Gets the current language set for speech synthesis.
 
bool setVoice (const std::string &voice_name="auto") override
 Sets the voice set for speech synthesis.
 
bool getVoice (std::string &voice_name) override
 Gets the current voice set for speech synthesis.
 
bool setSpeed (const double speed=0) override
 Sets the voice speed for speech synthesis.
 
bool getSpeed (double &speed) override
 Gets the current voice speed.
 
bool setPitch (const double pitch) override
 Sets the pitch for speech synthesis.
 
bool getPitch (double &pitch) override
 Gets the current pitch set for speech synthesis.
 
bool synthesize (const std::string &text, yarp::sig::Sound &sound) override
 Performs the speech synthesis.
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::ISpeechSynthesizer
virtual ~ISpeechSynthesizer ()
 
- Public Member Functions inherited from SpeechSynthesizer_nwc_yarp_ParamsParser
 SpeechSynthesizer_nwc_yarp_ParamsParser ()
 
 ~SpeechSynthesizer_nwc_yarp_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Protected Attributes

yarp::os::Port m_thriftClientPort
 

Additional Inherited Members

- Public Attributes inherited from SpeechSynthesizer_nwc_yarp_ParamsParser
const std::string m_device_classname = {"SpeechSynthesizer_nwc_yarp"}
 
const std::string m_device_name = {"speechSynthesizer_nwc_yarp"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
const std::string m_local_defaultValue = {""}
 
const std::string m_remote_defaultValue = {""}
 
std::string m_local = {}
 
std::string m_remote = {}
 

Detailed Description

speechSynthesizer_nwc_yarp: A network wrapper client that connects to a speechSynthesizer_nws_yarp to perform speech synthesis.

speechSynthesizer_nwc_yarp

Parameters required by this device are shown in class: SpeechSynthesizer_nwc_yarp_ParamsParser

Definition at line 37 of file SpeechSynthesizer_nwc_yarp.h.

Constructor & Destructor Documentation

◆ SpeechSynthesizer_nwc_yarp() [1/3]

SpeechSynthesizer_nwc_yarp::SpeechSynthesizer_nwc_yarp ( )
default

◆ SpeechSynthesizer_nwc_yarp() [2/3]

SpeechSynthesizer_nwc_yarp::SpeechSynthesizer_nwc_yarp ( const SpeechSynthesizer_nwc_yarp )
delete

◆ SpeechSynthesizer_nwc_yarp() [3/3]

SpeechSynthesizer_nwc_yarp::SpeechSynthesizer_nwc_yarp ( SpeechSynthesizer_nwc_yarp &&  )
delete

◆ ~SpeechSynthesizer_nwc_yarp()

SpeechSynthesizer_nwc_yarp::~SpeechSynthesizer_nwc_yarp ( )
override

Definition at line 16 of file SpeechSynthesizer_nwc_yarp.cpp.

Member Function Documentation

◆ close()

bool SpeechSynthesizer_nwc_yarp::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 21 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ getLanguage()

bool SpeechSynthesizer_nwc_yarp::getLanguage ( std::string &  language)
overridevirtual

Gets the current language set for speech synthesis.

Parameters
languagethe returned string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 76 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ getPitch()

bool SpeechSynthesizer_nwc_yarp::getPitch ( double &  voice)
overridevirtual

Gets the current pitch set for speech synthesis.

Parameters
pitchthe current voice pitch.
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 151 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ getSpeed()

bool SpeechSynthesizer_nwc_yarp::getSpeed ( double &  speed)
overridevirtual

Gets the current voice speed.

Parameters
speedthe current voice speed.
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 126 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ getVoice()

bool SpeechSynthesizer_nwc_yarp::getVoice ( std::string &  voice_name)
overridevirtual

Gets the current voice set for speech synthesis.

Parameters
voice_namethe currently used voice (device dependent).
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 101 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ open()

bool SpeechSynthesizer_nwc_yarp::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 26 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ operator=() [1/2]

SpeechSynthesizer_nwc_yarp & SpeechSynthesizer_nwc_yarp::operator= ( const SpeechSynthesizer_nwc_yarp )
delete

◆ operator=() [2/2]

SpeechSynthesizer_nwc_yarp & SpeechSynthesizer_nwc_yarp::operator= ( SpeechSynthesizer_nwc_yarp &&  )
delete

◆ setLanguage()

bool SpeechSynthesizer_nwc_yarp::setLanguage ( const std::string &  language = "auto")
overridevirtual

Sets the language for speech synthesis.

Parameters
languagea string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 65 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ setPitch()

bool SpeechSynthesizer_nwc_yarp::setPitch ( const double  pitch)
overridevirtual

Sets the pitch for speech synthesis.

Parameters
pitchthe voice pitch.
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 140 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ setSpeed()

bool SpeechSynthesizer_nwc_yarp::setSpeed ( const double  speed = 0)
overridevirtual

Sets the voice speed for speech synthesis.

Parameters
speedthe voice speed.
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 115 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ setVoice()

bool SpeechSynthesizer_nwc_yarp::setVoice ( const std::string &  voice_name = "auto")
overridevirtual

Sets the voice set for speech synthesis.

Parameters
voice_namethe name of of the voice (device dependent).
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 90 of file SpeechSynthesizer_nwc_yarp.cpp.

◆ synthesize()

bool SpeechSynthesizer_nwc_yarp::synthesize ( const std::string &  text,
yarp::sig::Sound sound 
)
overridevirtual

Performs the speech synthesis.

Parameters
textthe text to synthesize
soundthe synthesized audio stream
Returns
true on success

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 165 of file SpeechSynthesizer_nwc_yarp.cpp.

Member Data Documentation

◆ m_thriftClientPort

yarp::os::Port SpeechSynthesizer_nwc_yarp::m_thriftClientPort
protected

Definition at line 74 of file SpeechSynthesizer_nwc_yarp.h.


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