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

A generic interface for speech transcription. More...

#include <yarp/dev/ISpeechTranscription.h>

+ Inheritance diagram for yarp::dev::ISpeechTranscription:

Public Member Functions

virtual ~ISpeechTranscription ()
 
virtual yarp::dev::ReturnValue setLanguage (const std::string &language="auto")=0
 Sets the language for speech transcription.
 
virtual yarp::dev::ReturnValue getLanguage (std::string &language)=0
 Gets the current language set for speech transcription.
 
virtual yarp::dev::ReturnValue transcribe (const yarp::sig::Sound &sound, std::string &transcription, double &score)=0
 Performs the speech transcription.
 

Detailed Description

A generic interface for speech transcription.

Definition at line 20 of file ISpeechTranscription.h.

Constructor & Destructor Documentation

◆ ~ISpeechTranscription()

yarp::dev::ISpeechTranscription::~ISpeechTranscription ( )
virtualdefault

Member Function Documentation

◆ getLanguage()

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

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

Implemented in WhisperSpeechTranscription, GoogleSpeechTranscription, FakePythonSpeechTranscription, FakeSpeechTranscription, and SpeechTranscription_nwc_yarp.

◆ setLanguage()

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

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

Implemented in WhisperSpeechTranscription, FakePythonSpeechTranscription, FakeSpeechTranscription, GoogleSpeechTranscription, and SpeechTranscription_nwc_yarp.

◆ transcribe()

virtual yarp::dev::ReturnValue yarp::dev::ISpeechTranscription::transcribe ( const yarp::sig::Sound sound,
std::string &  transcription,
double &  score 
)
pure virtual

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

Implemented in WhisperSpeechTranscription, GoogleSpeechTranscription, FakePythonSpeechTranscription, FakeSpeechTranscription, and SpeechTranscription_nwc_yarp.


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