YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ISpeechTranscription.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_ISPEECHTRANSCRIPTION_H
7#define YARP_DEV_ISPEECHTRANSCRIPTION_H
8
9#include <yarp/dev/api.h>
10#include <yarp/sig/Sound.h>
11
12namespace yarp::dev {
13
20{
21public:
23
29 virtual bool setLanguage(const std::string& language="auto") = 0;
30
36 virtual bool getLanguage(std::string& language) = 0;
37
45 virtual bool transcribe(const yarp::sig::Sound& sound, std::string& transcription, double& score) = 0;
46};
47
48} // namespace yarp::dev
49
50#endif // YARP_DEV_ISPEECHTRANSCRIPTION_H
A generic interface for speech transcription.
virtual bool getLanguage(std::string &language)=0
Gets the current language set for speech transcription.
virtual bool setLanguage(const std::string &language="auto")=0
Sets the language for speech transcription.
virtual bool transcribe(const yarp::sig::Sound &sound, std::string &transcription, double &score)=0
Performs the speech transcription.
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
Definition Sound.h:25
For streams capable of holding different kinds of content, check what they actually have.
#define YARP_dev_API
Definition api.h:18