googleSpeechSynthesizer
: A yarp device for speech synthesis using google cloud cpp libraries
More...
Public Member Functions | |
GoogleSpeechSynthesizer () | |
GoogleSpeechSynthesizer (const GoogleSpeechSynthesizer &)=delete | |
GoogleSpeechSynthesizer (GoogleSpeechSynthesizer &&) noexcept=delete | |
GoogleSpeechSynthesizer & | operator= (const GoogleSpeechSynthesizer &)=delete |
GoogleSpeechSynthesizer & | operator= (GoogleSpeechSynthesizer &&) noexcept=delete |
~GoogleSpeechSynthesizer () override=default | |
bool | _voiceSupported (const std::string &voice_name) |
Checks whether or not a particular voice name is supported by the currently selected language code. | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. | |
bool | close () override |
Close the DeviceDriver. | |
yarp::dev::ReturnValue | setLanguage (const std::string &language="auto") 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="auto") 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 | setSpeed (const double speed=0) 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. | |
![]() | |
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. | |
![]() | |
GoogleSpeechSynthesizer_ParamsParser () | |
~GoogleSpeechSynthesizer_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. | |
![]() | |
virtual | ~IDeviceDriverParams () |
![]() | |
virtual | ~ISpeechSynthesizer () |
Additional Inherited Members | |
![]() | |
const std::string | m_device_classname = {"GoogleSpeechSynthesizer"} |
const std::string | m_device_name = {"googleSpeechSynthesizer"} |
bool | m_parser_is_strict = false |
const parser_version_type | m_parser_version = {} |
const std::string | m_language_code_defaultValue = {""} |
const std::string | m_voice_name_defaultValue = {""} |
const std::string | m_voice_speed_defaultValue = {"1"} |
const std::string | m_voice_pitch_defaultValue = {"0"} |
std::string | m_language_code = {} |
std::string | m_voice_name = {} |
double | m_voice_speed = {1} |
double | m_voice_pitch = {0} |
googleSpeechSynthesizer
: A yarp device for speech synthesis using google cloud cpp libraries
Parameters required by this device are described in class GoogleSpeechSynthesizer_ParamsParser
Definition at line 35 of file GoogleSpeechSynthesizer.h.
GoogleSpeechSynthesizer::GoogleSpeechSynthesizer | ( | ) |
Definition at line 28 of file GoogleSpeechSynthesizer.cpp.
|
delete |
|
deletenoexcept |
|
overridedefault |
Checks whether or not a particular voice name is supported by the currently selected language code.
voice_name | the name of of the voice |
Definition at line 33 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 98 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Gets the current language set for speech synthesis.
language | the returned string (code) representing the speech language (e.g. ita, eng...). Default value is "auto". |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 134 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Gets the current pitch set for speech synthesis.
pitch | the current voice pitch. |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 205 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Gets the current voice speed.
speed | the current voice speed. |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 186 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Gets the current voice set for speech synthesis.
voice_name | the currently used voice (device dependent). |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 167 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Open the DeviceDriver.
config | is 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). |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 57 of file GoogleSpeechSynthesizer.cpp.
|
delete |
|
deletenoexcept |
|
overridevirtual |
Sets the language for speech synthesis.
language | a string (code) representing the speech language (e.g. ita, eng...). Default value is "auto". |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 103 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Sets the pitch for speech synthesis.
pitch | the voice pitch. |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 193 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Sets the voice speed for speech synthesis.
speed | the voice speed. |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 174 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Sets the voice set for speech synthesis.
voice_name | the name of of the voice (device dependent). |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 141 of file GoogleSpeechSynthesizer.cpp.
|
overridevirtual |
Performs the speech synthesis.
text | the text to synthesize |
sound | the synthesized audio stream |
Implements yarp::dev::ISpeechSynthesizer.
Definition at line 212 of file GoogleSpeechSynthesizer.cpp.