Public Member Functions | Private Member Functions | Private Attributes | List of all members
cogrob::cloud::speech::GoogleSpeechRecognizer Class Reference

#include <google_speech.h>

Inheritance diagram for cogrob::cloud::speech::GoogleSpeechRecognizer:
Inheritance graph
[legend]

Public Member Functions

util::StatusOr< RecognitionResult > GetLastResult () override
 
 GoogleSpeechRecognizer ()
 
bool IsRunning () override
 
util::Status StartRecognize (AudioQueue *audio_queue, util::SimpleThreadSafeQueue< RecognitionResult > *result_queue, const std::vector< std::string > &hints, int max_audio_seconds, int max_wait_seconds, int max_alternatives) override
 
util::Status Stop () override
 
util::Status Wait () override
 
 ~GoogleSpeechRecognizer () override
 
- Public Member Functions inherited from cogrob::cloud::speech::GoogleSpeechRecognizerInterface
 GoogleSpeechRecognizerInterface ()
 
virtual ~GoogleSpeechRecognizerInterface ()
 

Private Member Functions

void RecognitionThread (AudioQueue *audio_queue, util::SimpleThreadSafeQueue< RecognitionResult > *result_queue, const std::vector< std::string > &hints, int max_audio_seconds, int max_wait_seconds, int max_alternatives)
 

Private Attributes

std::shared_ptr< grpc::ChannelInterface > channel_
 
std::atomic_bool done_flag_ {false}
 
std::mutex general_mutex_
 
std::unique_ptr<::google::cloud::speech::v1::Speech::Stub > gspeech_stub_
 
util::StatusOr< RecognitionResult > latest_result_
 
std::atomic_bool stop_flag_ {false}
 
std::unique_ptr< std::thread > thread_
 

Detailed Description

Definition at line 46 of file google_speech.h.

Constructor & Destructor Documentation

cogrob::cloud::speech::GoogleSpeechRecognizer::GoogleSpeechRecognizer ( )

Definition at line 62 of file google_speech.cc.

cogrob::cloud::speech::GoogleSpeechRecognizer::~GoogleSpeechRecognizer ( )
override

Definition at line 74 of file google_speech.cc.

Member Function Documentation

StatusOr< RecognitionResult > cogrob::cloud::speech::GoogleSpeechRecognizer::GetLastResult ( )
overridevirtual
bool cogrob::cloud::speech::GoogleSpeechRecognizer::IsRunning ( )
overridevirtual
void cogrob::cloud::speech::GoogleSpeechRecognizer::RecognitionThread ( AudioQueue audio_queue,
util::SimpleThreadSafeQueue< RecognitionResult > *  result_queue,
const std::vector< std::string > &  hints,
int  max_audio_seconds,
int  max_wait_seconds,
int  max_alternatives 
)
private

Definition at line 154 of file google_speech.cc.

Status cogrob::cloud::speech::GoogleSpeechRecognizer::StartRecognize ( AudioQueue audio_queue,
util::SimpleThreadSafeQueue< RecognitionResult > *  result_queue,
const std::vector< std::string > &  hints,
int  max_audio_seconds,
int  max_wait_seconds,
int  max_alternatives 
)
overridevirtual
Status cogrob::cloud::speech::GoogleSpeechRecognizer::Stop ( )
overridevirtual
Status cogrob::cloud::speech::GoogleSpeechRecognizer::Wait ( )
overridevirtual

Member Data Documentation

std::shared_ptr<grpc::ChannelInterface> cogrob::cloud::speech::GoogleSpeechRecognizer::channel_
private

Definition at line 78 of file google_speech.h.

std::atomic_bool cogrob::cloud::speech::GoogleSpeechRecognizer::done_flag_ {false}
private

Definition at line 81 of file google_speech.h.

std::mutex cogrob::cloud::speech::GoogleSpeechRecognizer::general_mutex_
private

Definition at line 77 of file google_speech.h.

std::unique_ptr<::google::cloud::speech::v1::Speech::Stub> cogrob::cloud::speech::GoogleSpeechRecognizer::gspeech_stub_
private

Definition at line 79 of file google_speech.h.

util::StatusOr<RecognitionResult> cogrob::cloud::speech::GoogleSpeechRecognizer::latest_result_
private

Definition at line 83 of file google_speech.h.

std::atomic_bool cogrob::cloud::speech::GoogleSpeechRecognizer::stop_flag_ {false}
private

Definition at line 80 of file google_speech.h.

std::unique_ptr<std::thread> cogrob::cloud::speech::GoogleSpeechRecognizer::thread_
private

Definition at line 82 of file google_speech.h.


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


gcloud_speech
Author(s):
autogenerated on Mon Jun 10 2019 13:20:53