Class SpeechConnection (2.21.0)

This interface defines virtual methods for each of the user-facing overload sets in SpeechClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type SpeechClient.

To create a concrete instance, see MakeSpeechConnection().

For mocking, see speech_v1_mocks::MockSpeechConnection.

Functions

virtual options()

Returns
TypeDescription
Options

virtual Recognize(google::cloud::speech::v1::RecognizeRequest const &)

Parameter
NameDescription
request google::cloud::speech::v1::RecognizeRequest const &
Returns
TypeDescription
StatusOr< google::cloud::speech::v1::RecognizeResponse >

virtual LongRunningRecognize(google::cloud::speech::v1::LongRunningRecognizeRequest const &)

Parameter
NameDescription
request google::cloud::speech::v1::LongRunningRecognizeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::speech::v1::LongRunningRecognizeResponse > >

virtual AsyncStreamingRecognize()

Returns
TypeDescription
std::unique_ptr<::google::cloud::AsyncStreamingReadWriteRpc< google::cloud::speech::v1::StreamingRecognizeRequest, google::cloud::speech::v1::StreamingRecognizeResponse > >