YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeSpeechSynthesizer.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 FAKESPEECHSYNTHESIZER_H
7#define FAKESPEECHSYNTHESIZER_H
8
11#include <yarp/os/Bottle.h>
12#include <stdio.h>
13
15
16using namespace yarp::os;
17
29{
30private:
31 bool m_verbose = true;
32
33public:
35 virtual ~FakeSpeechSynthesizer();
40
41 bool open(yarp::os::Searchable& config) override;
42 bool close() override;
43
44 virtual yarp::dev::ReturnValue setLanguage(const std::string& language) override;
45 virtual yarp::dev::ReturnValue getLanguage(std::string& language) override;
46 virtual yarp::dev::ReturnValue setVoice(const std::string& voice) override;
47 virtual yarp::dev::ReturnValue getVoice(std::string& voice) override;
48 virtual yarp::dev::ReturnValue setSpeed(const double speed) override;
49 virtual yarp::dev::ReturnValue getSpeed(double& voice) override;
50 virtual yarp::dev::ReturnValue setPitch(const double pitch) override;
51 virtual yarp::dev::ReturnValue getPitch(double& voice) override;
52 virtual yarp::dev::ReturnValue synthesize(const std::string& text, yarp::sig::Sound& sound) override;
53};
54
55#endif
This class is the parameters parser for class FakeSpeechSynthesizer.
FakeSpeechSynthesizer: A fake implementation of a speech synthesizer plugin.
virtual yarp::dev::ReturnValue getVoice(std::string &voice) override
Gets the current voice set for speech synthesis.
virtual yarp::dev::ReturnValue setPitch(const double pitch) override
Sets the pitch for speech synthesis.
virtual yarp::dev::ReturnValue getPitch(double &voice) override
Gets the current pitch set for speech synthesis.
bool close() override
Close the DeviceDriver.
FakeSpeechSynthesizer & operator=(const FakeSpeechSynthesizer &)=delete
FakeSpeechSynthesizer(FakeSpeechSynthesizer &&)=delete
virtual yarp::dev::ReturnValue getLanguage(std::string &language) override
Gets the current language set for speech synthesis.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
virtual yarp::dev::ReturnValue synthesize(const std::string &text, yarp::sig::Sound &sound) override
Performs the speech synthesis.
FakeSpeechSynthesizer & operator=(FakeSpeechSynthesizer &&)=delete
FakeSpeechSynthesizer(const FakeSpeechSynthesizer &)=delete
virtual yarp::dev::ReturnValue setLanguage(const std::string &language) override
Sets the language for speech synthesis.
virtual yarp::dev::ReturnValue getSpeed(double &voice) override
Gets the current voice speed.
virtual yarp::dev::ReturnValue setSpeed(const double speed) override
Sets the voice speed for speech synthesis.
virtual yarp::dev::ReturnValue setVoice(const std::string &voice) override
Sets the voice set for speech synthesis.
Interface implemented by all device drivers.
A generic interface for speech synthesis.
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
An interface to the operating system, including Port based communication.