YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakePythonSpeechTranscription Class Reference

FakePythonSpeechTranscription: A fake implementation of a speech transcriber plugin using python embedding. More...

#include <fake/fakePythonSpeechTranscription/FakePythonSpeechTranscription.h>

+ Inheritance diagram for FakePythonSpeechTranscription:

Public Member Functions

 FakePythonSpeechTranscription ()
 
virtual ~FakePythonSpeechTranscription ()
 
 FakePythonSpeechTranscription (const FakePythonSpeechTranscription &)=delete
 
 FakePythonSpeechTranscription (FakePythonSpeechTranscription &&)=delete
 
FakePythonSpeechTranscriptionoperator= (const FakePythonSpeechTranscription &)=delete
 
FakePythonSpeechTranscriptionoperator= (FakePythonSpeechTranscription &&)=delete
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
virtual bool setLanguage (const std::string &language) override
 Sets the language for speech transcription.
 
virtual bool getLanguage (std::string &language) override
 Gets the current language set for speech transcription.
 
virtual bool transcribe (const yarp::sig::Sound &sound, std::string &transcription, double &score) override
 Performs the speech transcription.
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::ISpeechTranscription
virtual ~ISpeechTranscription ()
 

Detailed Description

FakePythonSpeechTranscription: A fake implementation of a speech transcriber plugin using python embedding.

Definition at line 24 of file FakePythonSpeechTranscription.h.

Constructor & Destructor Documentation

◆ FakePythonSpeechTranscription() [1/3]

FakePythonSpeechTranscription::FakePythonSpeechTranscription ( )

Definition at line 22 of file FakePythonSpeechTranscription.cpp.

◆ ~FakePythonSpeechTranscription()

FakePythonSpeechTranscription::~FakePythonSpeechTranscription ( )
virtual

Definition at line 27 of file FakePythonSpeechTranscription.cpp.

◆ FakePythonSpeechTranscription() [2/3]

FakePythonSpeechTranscription::FakePythonSpeechTranscription ( const FakePythonSpeechTranscription )
delete

◆ FakePythonSpeechTranscription() [3/3]

FakePythonSpeechTranscription::FakePythonSpeechTranscription ( FakePythonSpeechTranscription &&  )
delete

Member Function Documentation

◆ close()

bool FakePythonSpeechTranscription::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 99 of file FakePythonSpeechTranscription.cpp.

◆ getLanguage()

bool FakePythonSpeechTranscription::getLanguage ( std::string &  language)
overridevirtual

Gets the current language set for speech transcription.

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

Implements yarp::dev::ISpeechTranscription.

Definition at line 179 of file FakePythonSpeechTranscription.cpp.

◆ open()

bool FakePythonSpeechTranscription::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 41 of file FakePythonSpeechTranscription.cpp.

◆ operator=() [1/2]

FakePythonSpeechTranscription & FakePythonSpeechTranscription::operator= ( const FakePythonSpeechTranscription )
delete

◆ operator=() [2/2]

FakePythonSpeechTranscription & FakePythonSpeechTranscription::operator= ( FakePythonSpeechTranscription &&  )
delete

◆ setLanguage()

bool FakePythonSpeechTranscription::setLanguage ( const std::string &  language)
overridevirtual

Sets the language for speech transcription.

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

Implements yarp::dev::ISpeechTranscription.

Definition at line 139 of file FakePythonSpeechTranscription.cpp.

◆ transcribe()

bool FakePythonSpeechTranscription::transcribe ( const yarp::sig::Sound sound,
std::string &  transcription,
double score 
)
overridevirtual

Performs the speech transcription.

Parameters
soundthe audio data to transcribe
transcriptionthe returned transcription (it may be empty)
scorethe returned score/confidence value in the range (0-1.0). It may be not implemented.
Returns
a ReturnValue, convertible to true/false

Implements yarp::dev::ISpeechTranscription.

Definition at line 211 of file FakePythonSpeechTranscription.cpp.


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