YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
SpeechTranscription_nwc_yarp.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_SPEECHTRANSCRIPTION_NWC_YARP_H
7#define YARP_DEV_SPEECHTRANSCRIPTION_NWC_YARP_H
8
9#include <cstdio>
10#include <cstdlib>
11
13#include <yarp/dev/PolyDriver.h>
15#include <yarp/sig/Sound.h>
16#include <yarp/os/Time.h>
17#include <yarp/os/Network.h>
18#include <yarp/os/Thread.h>
19#include <yarp/os/Vocab.h>
20#include <yarp/os/Bottle.h>
21#include <yarp/os/RpcServer.h>
25
40{
41 // Methods
42private:
43 bool closeMain();
44
45public:
51 virtual ~SpeechTranscription_nwc_yarp() override;
52
53 // yarp::dev::DeviceDriver
54 bool open(yarp::os::Searchable& config) override;
55 bool close() override;
56
57 //yarp::dev::ISpeechTranscription
58 yarp::dev::ReturnValue setLanguage(const std::string& language="auto") override;
59 yarp::dev::ReturnValue getLanguage(std::string& language) override;
60 yarp::dev::ReturnValue transcribe(const yarp::sig::Sound& sound, std::string& transcription, double& score) override;
61
62 // Parameters
63private:
64 ISpeechTranscriptionMsgs m_thriftClient;
65
66protected:
68};
69
70
71#endif // YARP_DEV_SPEECHTRANSCRIPTION_NWC_YARP_H
This class is the parameters parser for class SpeechTranscription_nwc_yarp.
speechTranscription_nwc_yarp: A network wrapper client that connects to a speechTranscription_nws_yar...
yarp::dev::ReturnValue setLanguage(const std::string &language="auto") override
Sets the language for speech transcription.
bool close() override
Close the DeviceDriver.
SpeechTranscription_nwc_yarp(SpeechTranscription_nwc_yarp &&)=delete
SpeechTranscription_nwc_yarp & operator=(SpeechTranscription_nwc_yarp &&)=delete
yarp::dev::ReturnValue getLanguage(std::string &language) override
Gets the current language set for speech transcription.
SpeechTranscription_nwc_yarp & operator=(const SpeechTranscription_nwc_yarp &)=delete
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue transcribe(const yarp::sig::Sound &sound, std::string &transcription, double &score) override
Performs the speech transcription.
SpeechTranscription_nwc_yarp(const SpeechTranscription_nwc_yarp &)=delete
Interface implemented by all device drivers.
A generic interface for speech transcription.
A mini-server for network communication.
Definition Port.h:46
A base class for nested structures that can be searched.
Definition Searchable.h:31
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
Definition Sound.h:25