YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::dev::ISpeechSynthesizer Class Referenceabstract

A generic interface for speech synthesis. More...

#include <yarp/dev/ISpeechSynthesizer.h>

+ Inheritance diagram for yarp::dev::ISpeechSynthesizer:

Public Member Functions

virtual ~ISpeechSynthesizer ()
 
virtual yarp::dev::ReturnValue setLanguage (const std::string &language="auto")=0
 Sets the language for speech synthesis.
 
virtual yarp::dev::ReturnValue getLanguage (std::string &language)=0
 Gets the current language set for speech synthesis.
 
virtual yarp::dev::ReturnValue setVoice (const std::string &voice_name="auto")=0
 Sets the voice set for speech synthesis.
 
virtual yarp::dev::ReturnValue getVoice (std::string &voice_name)=0
 Gets the current voice set for speech synthesis.
 
virtual yarp::dev::ReturnValue setSpeed (const double speed=0)=0
 Sets the voice speed for speech synthesis.
 
virtual yarp::dev::ReturnValue getSpeed (double &speed)=0
 Gets the current voice speed.
 
virtual yarp::dev::ReturnValue setPitch (const double pitch)=0
 Sets the pitch for speech synthesis.
 
virtual yarp::dev::ReturnValue getPitch (double &voice)=0
 Gets the current pitch set for speech synthesis.
 
virtual yarp::dev::ReturnValue synthesize (const std::string &text, yarp::sig::Sound &sound)=0
 Performs the speech synthesis.
 

Detailed Description

A generic interface for speech synthesis.

Definition at line 20 of file ISpeechSynthesizer.h.

Constructor & Destructor Documentation

◆ ~ISpeechSynthesizer()

yarp::dev::ISpeechSynthesizer::~ISpeechSynthesizer ( )
virtualdefault

Member Function Documentation

◆ getLanguage()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::getLanguage ( std::string &  language)
pure virtual

Gets the current language set for speech synthesis.

Parameters
languagethe returned string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
Returns
a ReturnValue, convertible to true/false

Implemented in TtsDevice, GoogleSpeechSynthesizer, FakeSpeechSynthesizer, and SpeechSynthesizer_nwc_yarp.

◆ getPitch()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::getPitch ( double &  voice)
pure virtual

Gets the current pitch set for speech synthesis.

Parameters
pitchthe current voice pitch.
Returns
a ReturnValue, convertible to true/false

Implemented in TtsDevice, GoogleSpeechSynthesizer, SpeechSynthesizer_nwc_yarp, and FakeSpeechSynthesizer.

◆ getSpeed()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::getSpeed ( double &  speed)
pure virtual

Gets the current voice speed.

Parameters
speedthe current voice speed.
Returns
a ReturnValue, convertible to true/false

Implemented in TtsDevice, GoogleSpeechSynthesizer, SpeechSynthesizer_nwc_yarp, and FakeSpeechSynthesizer.

◆ getVoice()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::getVoice ( std::string &  voice_name)
pure virtual

Gets the current voice set for speech synthesis.

Parameters
voice_namethe currently used voice (device dependent).
Returns
a ReturnValue, convertible to true/false

Implemented in FakeSpeechSynthesizer, TtsDevice, GoogleSpeechSynthesizer, and SpeechSynthesizer_nwc_yarp.

◆ setLanguage()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::setLanguage ( const std::string &  language = "auto")
pure virtual

Sets the language for speech synthesis.

Parameters
languagea string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
Returns
a ReturnValue, convertible to true/false

Implemented in FakeSpeechSynthesizer, TtsDevice, GoogleSpeechSynthesizer, and SpeechSynthesizer_nwc_yarp.

◆ setPitch()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::setPitch ( const double  pitch)
pure virtual

Sets the pitch for speech synthesis.

Parameters
pitchthe voice pitch.
Returns
a ReturnValue, convertible to true/false

Implemented in TtsDevice, GoogleSpeechSynthesizer, FakeSpeechSynthesizer, and SpeechSynthesizer_nwc_yarp.

◆ setSpeed()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::setSpeed ( const double  speed = 0)
pure virtual

Sets the voice speed for speech synthesis.

Parameters
speedthe voice speed.
Returns
a ReturnValue, convertible to true/false

Implemented in FakeSpeechSynthesizer, TtsDevice, GoogleSpeechSynthesizer, and SpeechSynthesizer_nwc_yarp.

◆ setVoice()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::setVoice ( const std::string &  voice_name = "auto")
pure virtual

Sets the voice set for speech synthesis.

Parameters
voice_namethe name of of the voice (device dependent).
Returns
a ReturnValue, convertible to true/false

Implemented in FakeSpeechSynthesizer, TtsDevice, GoogleSpeechSynthesizer, and SpeechSynthesizer_nwc_yarp.

◆ synthesize()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechSynthesizer::synthesize ( const std::string &  text,
yarp::sig::Sound sound 
)
pure virtual

Performs the speech synthesis.

Parameters
textthe text to synthesize
soundthe synthesized audio stream
Returns
a ReturnValue, convertible to true/false

Implemented in TtsDevice, GoogleSpeechSynthesizer, FakeSpeechSynthesizer, and SpeechSynthesizer_nwc_yarp.


The documentation for this class was generated from the following files: