Class SpeechConnection (2.28.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 LongRunningRecognize(NoAwaitTag, google::cloud::speech::v1::LongRunningRecognizeRequest const &)

Parameters
Name Description
NoAwaitTag
request google::cloud::speech::v1::LongRunningRecognizeRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual LongRunningRecognize(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation 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 > >