19 YARP_LOG_COMPONENT(FakeSpeechSynthesizerParamsCOMPONENT,
"yarp.device.FakeSpeechSynthesizer")
30 std::vector<std::string> params;
31 params.push_back(
"language");
32 params.push_back(
"voice");
33 params.push_back(
"speed");
34 params.push_back(
"pitch");
41 if (paramName ==
"language")
46 if (paramName ==
"voice")
51 if (paramName ==
"speed")
53 paramValue = std::to_string(
m_speed);
56 if (paramName ==
"pitch")
58 paramValue = std::to_string(
m_pitch);
62 yError() <<
"parameter '" << paramName <<
"' was not found";
81 if (config.
check(
"help"))
90 if (config.
check(
"language"))
93 yCInfo(FakeSpeechSynthesizerParamsCOMPONENT) <<
"Parameter 'language' using value:" <<
m_language;
97 yCInfo(FakeSpeechSynthesizerParamsCOMPONENT) <<
"Parameter 'language' using DEFAULT value:" <<
m_language;
99 prop_check.
unput(
"language");
104 if (config.
check(
"voice"))
107 yCInfo(FakeSpeechSynthesizerParamsCOMPONENT) <<
"Parameter 'voice' using value:" <<
m_voice;
111 yCInfo(FakeSpeechSynthesizerParamsCOMPONENT) <<
"Parameter 'voice' using DEFAULT value:" <<
m_voice;
113 prop_check.
unput(
"voice");
118 if (config.
check(
"speed"))
121 yCInfo(FakeSpeechSynthesizerParamsCOMPONENT) <<
"Parameter 'speed' using value:" <<
m_speed;
125 yCInfo(FakeSpeechSynthesizerParamsCOMPONENT) <<
"Parameter 'speed' using DEFAULT value:" <<
m_speed;
127 prop_check.
unput(
"speed");
132 if (config.
check(
"pitch"))
135 yCInfo(FakeSpeechSynthesizerParamsCOMPONENT) <<
"Parameter 'pitch' using value:" <<
m_pitch;
139 yCInfo(FakeSpeechSynthesizerParamsCOMPONENT) <<
"Parameter 'pitch' using DEFAULT value:" <<
m_pitch;
141 prop_check.
unput(
"pitch");
176 doc = doc + std::string(
"\n=============================================\n");
177 doc = doc + std::string(
"This is the help for device: FakeSpeechSynthesizer\n");
178 doc = doc + std::string(
"\n");
179 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
180 doc = doc + std::string(
"'language': language code\n");
181 doc = doc + std::string(
"'voice': voice code\n");
182 doc = doc + std::string(
"'speed': speed\n");
183 doc = doc + std::string(
"'pitch': pitch\n");
184 doc = doc + std::string(
"\n");
185 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
186 doc = doc +
" yarpdev --device fakeSpeechSynthesizer --language auto --voice auto --speed 0.0 --pitch 0.0\n";
187 doc = doc + std::string(
"Using only mandatory params:\n");
188 doc = doc +
" yarpdev --device fakeSpeechSynthesizer\n";
189 doc = doc + std::string(
"=============================================\n\n");
return doc;
std::string m_provided_configuration
FakeSpeechSynthesizer_ParamsParser()
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::string getConfiguration() const override
Return the configuration of the device.
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
bool getParamValue(const std::string ¶mName, std::string ¶mValue) const override
Return the value (represented as a string) of the requested parameter.
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
A class for storing options and configuration information.
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
#define yCInfo(component,...)
#define YARP_LOG_COMPONENT(name,...)