Class SpeechConnection (2.24.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
Type Description
Options

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

Parameter
Name Description
request google::cloud::speech::v1::RecognizeRequest const &
Returns
Type Description
StatusOr< google::cloud::speech::v1::RecognizeResponse >

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

Parameter
Name Description
request google::cloud::speech::v1::LongRunningRecognizeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v1::LongRunningRecognizeResponse > >

virtual AsyncStreamingRecognize()

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