#include <google_speech.h>
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 | |
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::mutex | general_mutex_ |
std::unique_ptr <::google::cloud::speech::v1::Speech::Stub > | gspeech_stub_ |
util::StatusOr< RecognitionResult > | latest_result_ |
std::unique_ptr< std::thread > | thread_ |
Definition at line 46 of file google_speech.h.
Definition at line 62 of file google_speech.cc.
Definition at line 74 of file google_speech.cc.
StatusOr< RecognitionResult > cogrob::cloud::speech::GoogleSpeechRecognizer::GetLastResult | ( | ) | [override, virtual] |
Implements cogrob::cloud::speech::GoogleSpeechRecognizerInterface.
Definition at line 105 of file google_speech.cc.
bool cogrob::cloud::speech::GoogleSpeechRecognizer::IsRunning | ( | ) | [override, virtual] |
Implements cogrob::cloud::speech::GoogleSpeechRecognizerInterface.
Definition at line 137 of file google_speech.cc.
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 | ||
) | [override] |
Definition at line 78 of file google_speech.cc.
Status cogrob::cloud::speech::GoogleSpeechRecognizer::Stop | ( | ) | [override, virtual] |
Implements cogrob::cloud::speech::GoogleSpeechRecognizerInterface.
Definition at line 123 of file google_speech.cc.
Status cogrob::cloud::speech::GoogleSpeechRecognizer::Wait | ( | ) | [override, virtual] |
Implements cogrob::cloud::speech::GoogleSpeechRecognizerInterface.
Definition at line 112 of file google_speech.cc.
std::shared_ptr<grpc::ChannelInterface> cogrob::cloud::speech::GoogleSpeechRecognizer::channel_ [private] |
Definition at line 78 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::unique_ptr<std::thread> cogrob::cloud::speech::GoogleSpeechRecognizer::thread_ [private] |
Definition at line 80 of file google_speech.h.