6#ifndef YARP_GOOGLESPEECHTRANSCR_H
7#define YARP_GOOGLESPEECHTRANSCR_H
17#include "google/cloud/speech/v1/speech_client.h"
18#include "google/protobuf/repeated_ptr_field.h"
48 bool open(
yarp::os::Searchable& config) override;
49 bool close() override;
54 yarp::dev::ReturnValue
transcribe(const
yarp::sig::Sound& sound,
std::
string& transcription,
double& score) override;
57 bool m_offline{
false};
58 google::cloud::speech::v1::RecognitionConfig m_audioConfig;
59 std::shared_ptr<google::cloud::speech_v1::SpeechClient> m_client{
nullptr};
This class is the parameters parser for class GoogleSpeechTranscription.
googleSpeechTranscription: A yarp device for speech transcription using google cloud cpp libraries
GoogleSpeechTranscription()
yarp::dev::ReturnValue setLanguage(const std::string &language="auto") override
Sets the language for speech transcription.
yarp::dev::ReturnValue getLanguage(std::string &language) override
Gets the current language set for speech transcription.
GoogleSpeechTranscription(const GoogleSpeechTranscription &)=delete
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue transcribe(const yarp::sig::Sound &sound, std::string &transcription, double &score) override
Performs the speech transcription.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
GoogleSpeechTranscription(GoogleSpeechTranscription &&) noexcept=delete
Interface implemented by all device drivers.
A generic interface for speech transcription.
The main, catch-all namespace for YARP.