29 input_buffer.
attach(m_inputPort);
63 if (
nullptr == m_isptr)
80bool SpeechSynthesizer_nws_yarp::detach()
86bool SpeechSynthesizer_nws_yarp::closeMain()
96 if (callback_impl) {
delete callback_impl; callback_impl=
nullptr;}
118 std::lock_guard <std::mutex>
lg(m_mutex);
129 std::lock_guard <std::mutex>
lg(m_mutex);
133 std::string language;
136 ret.language = language;
145 std::lock_guard <std::mutex>
lg(m_mutex);
156 std::lock_guard <std::mutex>
lg(m_mutex);
172 std::lock_guard <std::mutex>
lg(m_mutex);
183 std::lock_guard <std::mutex>
lg(m_mutex);
199 std::lock_guard <std::mutex>
lg(m_mutex);
210 std::lock_guard <std::mutex>
lg(m_mutex);
226 std::lock_guard <std::mutex>
lg(m_mutex);
238 m_output_port->
write(snd);
251 if (x ==
nullptr ||
p==
nullptr)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_get_pitch get_pitch() override
virtual bool set_speed(double speed) override
virtual return_get_speed get_speed() override
virtual bool set_voice(const std::string &language) override
virtual return_get_voice get_voice() override
virtual return_get_language get_language() override
virtual bool set_pitch(double pitch) override
virtual bool set_language(const std::string &language) override
void setOutputPort(yarp::os::Port *port)
void setInterfaces(yarp::dev::ISpeechSynthesizer *iser)
virtual return_synthesize synthesize(const std::string &text) override
Callback implementation after buffered input.
ImplementCallbackHelper2()
void onRead(Bottle &b) override
Callback method.
yarp::dev::ISpeechSynthesizer * m_isptr
yarp::os::Port * m_output_port
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
void run() override
Main body of the new thread.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual ~SpeechSynthesizer_nws_yarp() override
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool close() override
Close the DeviceDriver.
A generic interface for speech synthesis.
virtual bool setSpeed(const double speed=0)=0
Sets the voice speed for speech synthesis.
virtual bool getLanguage(std::string &language)=0
Gets the current language set for speech synthesis.
virtual bool setVoice(const std::string &voice_name="auto")=0
Sets the voice set for speech synthesis.
virtual bool getVoice(std::string &voice_name)=0
Gets the current voice set for speech synthesis.
virtual bool setLanguage(const std::string &language="auto")=0
Sets the language for speech synthesis.
virtual bool getPitch(double &voice)=0
Gets the current pitch set for speech synthesis.
virtual bool synthesize(const std::string &text, yarp::sig::Sound &sound)=0
Performs the speech synthesis.
virtual bool getSpeed(double &speed)=0
Gets the current voice speed.
virtual bool setPitch(const double pitch)=0
Sets the pitch for speech synthesis.
A container for a device driver.
A simple collection of objects that can be described and transmitted in a portable way.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
A mini-server for performing network communication in the background.
An interface for reading from a network connection.
void attach(Port &port)
Attach this buffer to a particular port.
void useCallback(TypedReaderCallback< T > &callback) override
Set an object whose onRead method will be called when data is available.
void disableCallback() override
Remove a callback set up with useCallback()
A mini-server for network communication.
int getOutputCount() override
Determine how many output connections this port has.
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
void setReader(PortReader &reader) override
Set an external reader for port data.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base class for nested structures that can be searched.
static void delaySystem(double seconds)
bool stop()
Stop the thread.
bool isStopping()
Returns true if the thread is stopping (Thread::stop has been called).
bool isRunning()
Returns true if the thread is running (Thread::start has been called successfully and the thread has ...
bool start()
Start the new thread running.
virtual std::string asString() const
Get string value.
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)