YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
SpeechSynthesizer_nwc_yarp.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_SPEECHSYNTHESIZER_NWC_YARP_H
7#define YARP_DEV_SPEECHSYNTHESIZER_NWC_YARP_H
8
9#include <cstdio>
10#include <cstdlib>
11
13#include <yarp/dev/PolyDriver.h>
15#include <yarp/sig/Sound.h>
16#include <yarp/os/Time.h>
17#include <yarp/os/Network.h>
18#include <yarp/os/Thread.h>
19#include <yarp/os/Vocab.h>
20#include <yarp/os/Bottle.h>
21#include <yarp/os/RpcServer.h>
26
42{
43 // Methods
44private:
45 bool closeMain();
46
47public:
54
55 // yarp::dev::DeviceDriver
56 bool open(yarp::os::Searchable& config) override;
57 bool close() override;
58
59 // yarp::dev::ISpeechSynthesizer
60 yarp::dev::ReturnValue setLanguage(const std::string& language="auto") override;
61 yarp::dev::ReturnValue getLanguage(std::string& language) override;
62 yarp::dev::ReturnValue setVoice(const std::string& voice_name = "auto") override;
63 yarp::dev::ReturnValue getVoice(std::string& voice_name) override;
64 yarp::dev::ReturnValue setSpeed(const double speed=0) override;
65 yarp::dev::ReturnValue getSpeed(double& speed) override;
66 yarp::dev::ReturnValue setPitch(const double pitch) override;
67 yarp::dev::ReturnValue getPitch(double& pitch) override;
68 yarp::dev::ReturnValue synthesize(const std::string& text, yarp::sig::Sound& sound) override;
69
70 // Parameters
71private:
72 ISpeechSynthesizerMsgs m_thriftClient;
73
74protected:
76};
77
78
79#endif // YARP_DEV_SPEECHSYNTHESIZER_NWC_YARP_H
This class is the parameters parser for class SpeechSynthesizer_nwc_yarp.
speechSynthesizer_nwc_yarp: A network wrapper client that connects to a speechSynthesizer_nws_yarp to...
yarp::dev::ReturnValue synthesize(const std::string &text, yarp::sig::Sound &sound) override
Performs the speech synthesis.
yarp::dev::ReturnValue setSpeed(const double speed=0) override
Sets the voice speed for speech synthesis.
yarp::dev::ReturnValue getPitch(double &pitch) override
Gets the current pitch set for speech synthesis.
SpeechSynthesizer_nwc_yarp & operator=(SpeechSynthesizer_nwc_yarp &&)=delete
yarp::dev::ReturnValue getSpeed(double &speed) override
Gets the current voice speed.
yarp::dev::ReturnValue setLanguage(const std::string &language="auto") override
Sets the language for speech synthesis.
yarp::dev::ReturnValue setPitch(const double pitch) override
Sets the pitch for speech synthesis.
bool close() override
Close the DeviceDriver.
SpeechSynthesizer_nwc_yarp & operator=(const SpeechSynthesizer_nwc_yarp &)=delete
SpeechSynthesizer_nwc_yarp(SpeechSynthesizer_nwc_yarp &&)=delete
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue setVoice(const std::string &voice_name="auto") override
Sets the voice set for speech synthesis.
yarp::dev::ReturnValue getLanguage(std::string &language) override
Gets the current language set for speech synthesis.
SpeechSynthesizer_nwc_yarp(const SpeechSynthesizer_nwc_yarp &)=delete
SpeechSynthesizer_nwc_yarp()=default
yarp::dev::ReturnValue getVoice(std::string &voice_name) override
Gets the current voice set for speech synthesis.
Interface implemented by all device drivers.
A generic interface for speech synthesis.
A mini-server for network communication.
Definition Port.h:46
A base class for nested structures that can be searched.
Definition Searchable.h:31
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
Definition Sound.h:25