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>
12
13namespace yarp::dev {
14
21{
22public:
24
30 virtual yarp::dev::ReturnValue setLanguage(const std::string& language="auto") = 0;
31
37 virtual yarp::dev::ReturnValue getLanguage(std::string& language) = 0;
38
46 virtual yarp::dev::ReturnValue transcribe(const yarp::sig::Sound& sound, std::string& transcription, double& score) = 0;
47};
48
49} // namespace yarp::dev
50
51#endif // YARP_DEV_ISPEECHTRANSCRIPTION_H
A generic interface for speech transcription.
virtual yarp::dev::ReturnValue transcribe(const yarp::sig::Sound &sound, std::string &transcription, double &score)=0
Performs the speech transcription.
virtual yarp::dev::ReturnValue getLanguage(std::string &language)=0
Gets the current language set for speech transcription.
virtual yarp::dev::ReturnValue setLanguage(const std::string &language="auto")=0
Sets the language for 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