27 #ifndef COGROB_CLOUD_SPEECH_GOOGLE_SPEECH_H_ 28 #define COGROB_CLOUD_SPEECH_GOOGLE_SPEECH_H_ 30 #include <grpc++/grpc++.h> 39 #include "cogrob/cloud/speech/proto/recognition_result.pb.h" 55 const std::vector<std::string>& hints,
int max_audio_seconds,
56 int max_wait_seconds,
int max_alternatives)
override;
74 const std::vector<std::string>& hints,
int max_audio_seconds,
75 int max_wait_seconds,
int max_alternatives);
78 std::shared_ptr<grpc::ChannelInterface>
channel_;
79 std::unique_ptr<::google::cloud::speech::v1::Speech::Stub>
gspeech_stub_;
90 #endif // COGROB_CLOUD_SPEECH_GOOGLE_SPEECH_H_ bool IsRunning() override
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)
std::unique_ptr< std::thread > thread_
std::atomic_bool stop_flag_
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::StatusOr< RecognitionResult > latest_result_
util::Status Stop() override
std::unique_ptr<::google::cloud::speech::v1::Speech::Stub > gspeech_stub_
std::atomic_bool done_flag_
util::StatusOr< RecognitionResult > GetLastResult() override
util::Status Wait() override
std::mutex general_mutex_
std::shared_ptr< grpc::ChannelInterface > channel_
~GoogleSpeechRecognizer() override