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

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/opt-modules/yarp-device-voicebox/src/devices/voiceBoxSynthesizer/VoiceBoxSynthesizer.h>

+ Inheritance diagram for VoiceBoxSynthesizer:

Public Member Functions

 VoiceBoxSynthesizer ()
 
 VoiceBoxSynthesizer (const VoiceBoxSynthesizer &)=delete
 
 VoiceBoxSynthesizer (VoiceBoxSynthesizer &&) noexcept=delete
 
VoiceBoxSynthesizer & operator= (const VoiceBoxSynthesizer &)=delete
 
VoiceBoxSynthesizer & operator= (VoiceBoxSynthesizer &&) noexcept=delete
 
 ~VoiceBoxSynthesizer () override=default
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
yarp::dev::ReturnValue setLanguage (const std::string &language) override
 Sets the language for speech synthesis.
 
yarp::dev::ReturnValue getLanguage (std::string &language) override
 Gets the current language set for speech synthesis.
 
yarp::dev::ReturnValue setVoice (const std::string &voice_name) override
 Sets the voice set for speech synthesis.
 
yarp::dev::ReturnValue getVoice (std::string &voice_name) override
 Gets the current voice set for speech synthesis.
 
yarp::dev::ReturnValue getAvailableVoices (yarp::sig::VectorOfString &voices) override
 
yarp::dev::ReturnValue setSpeed (const double speed) override
 Sets the voice speed for speech synthesis.
 
yarp::dev::ReturnValue getSpeed (double &speed) override
 Gets the current voice speed.
 
yarp::dev::ReturnValue setPitch (const double pitch) override
 Sets the pitch for speech synthesis.
 
yarp::dev::ReturnValue getPitch (double &pitch) override
 Gets the current pitch set for speech synthesis.
 
yarp::dev::ReturnValue 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
 
DeviceDriver & operator= (const DeviceDriver &other)=delete
 
DeviceDriver & operator= (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 DeviceDriver * getImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::ISpeechSynthesizer
virtual ~ISpeechSynthesizer ()
 
- Public Member Functions inherited from VoiceBoxSynthesizer_ParamsParser
 VoiceBoxSynthesizer_ParamsParser ()
 
 ~VoiceBoxSynthesizer_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.
 
bool getParamValue (const std::string &paramName, std::string &paramValue) const override
 Return the value (represented as a string) of the requested parameter.
 
std::string getConfiguration () const override
 Return the configuration of the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Additional Inherited Members

- Public Attributes inherited from VoiceBoxSynthesizer_ParamsParser
const std::string m_device_classname = {"VoiceBoxSynthesizer"}
 
const std::string m_device_name = {"voiceBoxSynthesizer"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
std::string m_provided_configuration
 
const std::string m_base_ip_defaultValue = {"localhost"}
 
const std::string m_base_port_defaultValue = {"17493"}
 
const std::string m_voice_defaultValue = {""}
 
std::string m_base_ip = {"localhost"}
 
std::string m_base_port = {"17493"}
 
std::string m_voice = {}
 

Detailed Description

Definition at line 27 of file VoiceBoxSynthesizer.h.

Constructor & Destructor Documentation

◆ VoiceBoxSynthesizer() [1/3]

VoiceBoxSynthesizer::VoiceBoxSynthesizer ( )

Definition at line 474 of file VoiceBoxSynthesizer.cpp.

◆ VoiceBoxSynthesizer() [2/3]

VoiceBoxSynthesizer::VoiceBoxSynthesizer ( const VoiceBoxSynthesizer &  )
delete

◆ VoiceBoxSynthesizer() [3/3]

VoiceBoxSynthesizer::VoiceBoxSynthesizer ( VoiceBoxSynthesizer &&  )
deletenoexcept

◆ ~VoiceBoxSynthesizer()

VoiceBoxSynthesizer::~VoiceBoxSynthesizer ( )
overridedefault

Member Function Documentation

◆ close()

bool VoiceBoxSynthesizer::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 504 of file VoiceBoxSynthesizer.cpp.

◆ getAvailableVoices()

yarp::dev::ReturnValue VoiceBoxSynthesizer::getAvailableVoices ( yarp::sig::VectorOfString &  voices)
override

Definition at line 566 of file VoiceBoxSynthesizer.cpp.

◆ getLanguage()

yarp::dev::ReturnValue VoiceBoxSynthesizer::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
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 526 of file VoiceBoxSynthesizer.cpp.

◆ getPitch()

yarp::dev::ReturnValue VoiceBoxSynthesizer::getPitch ( double &  voice)
overridevirtual

Gets the current pitch set for speech synthesis.

Parameters
pitchthe current voice pitch.
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 607 of file VoiceBoxSynthesizer.cpp.

◆ getSpeed()

yarp::dev::ReturnValue VoiceBoxSynthesizer::getSpeed ( double &  speed)
overridevirtual

Gets the current voice speed.

Parameters
speedthe current voice speed.
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 592 of file VoiceBoxSynthesizer.cpp.

◆ getVoice()

yarp::dev::ReturnValue VoiceBoxSynthesizer::getVoice ( std::string &  voice_name)
overridevirtual

Gets the current voice set for speech synthesis.

Parameters
voice_namethe currently used voice (device dependent).
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 560 of file VoiceBoxSynthesizer.cpp.

◆ open()

bool VoiceBoxSynthesizer::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. 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 478 of file VoiceBoxSynthesizer.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

VoiceBoxSynthesizer & VoiceBoxSynthesizer::operator= ( VoiceBoxSynthesizer &&  )
deletenoexcept

◆ setLanguage()

yarp::dev::ReturnValue VoiceBoxSynthesizer::setLanguage ( const std::string &  language)
overridevirtual

Sets the language for speech synthesis.

Parameters
languagea string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 511 of file VoiceBoxSynthesizer.cpp.

◆ setPitch()

yarp::dev::ReturnValue VoiceBoxSynthesizer::setPitch ( const double  pitch)
overridevirtual

Sets the pitch for speech synthesis.

Parameters
pitchthe voice pitch.
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 598 of file VoiceBoxSynthesizer.cpp.

◆ setSpeed()

yarp::dev::ReturnValue VoiceBoxSynthesizer::setSpeed ( const double  speed)
overridevirtual

Sets the voice speed for speech synthesis.

Parameters
speedthe voice speed.
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 583 of file VoiceBoxSynthesizer.cpp.

◆ setVoice()

yarp::dev::ReturnValue VoiceBoxSynthesizer::setVoice ( const std::string &  voice_name)
overridevirtual

Sets the voice set for speech synthesis.

Parameters
voice_namethe name of of the voice (device dependent).
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 532 of file VoiceBoxSynthesizer.cpp.

◆ synthesize()

yarp::dev::ReturnValue VoiceBoxSynthesizer::synthesize ( const std::string &  text,
yarp::sig::Sound &  sound 
)
overridevirtual

Performs the speech synthesis.

Parameters
textthe text to synthesize
soundthe synthesized audio stream
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechSynthesizer.

Definition at line 613 of file VoiceBoxSynthesizer.cpp.


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