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_v2_mocks::MockSpeechConnection.

Functions

virtual options()

Returns
Type Description
Options

virtual CreateRecognizer(google::cloud::speech::v2::CreateRecognizerRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::CreateRecognizerRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::Recognizer > >

virtual CreateRecognizer(NoAwaitTag, google::cloud::speech::v2::CreateRecognizerRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::Recognizer > >

virtual ListRecognizers(google::cloud::speech::v2::ListRecognizersRequest)

Parameter
Name Description
request google::cloud::speech::v2::ListRecognizersRequest
Returns
Type Description
StreamRange< google::cloud::speech::v2::Recognizer >

virtual GetRecognizer(google::cloud::speech::v2::GetRecognizerRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::GetRecognizerRequest const &
Returns
Type Description
StatusOr< google::cloud::speech::v2::Recognizer >

virtual UpdateRecognizer(google::cloud::speech::v2::UpdateRecognizerRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::UpdateRecognizerRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::Recognizer > >

virtual UpdateRecognizer(NoAwaitTag, google::cloud::speech::v2::UpdateRecognizerRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::Recognizer > >

virtual DeleteRecognizer(google::cloud::speech::v2::DeleteRecognizerRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::DeleteRecognizerRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::Recognizer > >

virtual DeleteRecognizer(NoAwaitTag, google::cloud::speech::v2::DeleteRecognizerRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::Recognizer > >

virtual UndeleteRecognizer(google::cloud::speech::v2::UndeleteRecognizerRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::UndeleteRecognizerRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::Recognizer > >

virtual UndeleteRecognizer(NoAwaitTag, google::cloud::speech::v2::UndeleteRecognizerRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::Recognizer > >

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

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

virtual AsyncStreamingRecognize()

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

virtual BatchRecognize(google::cloud::speech::v2::BatchRecognizeRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::BatchRecognizeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::BatchRecognizeResponse > >

virtual BatchRecognize(NoAwaitTag, google::cloud::speech::v2::BatchRecognizeRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::BatchRecognizeResponse > >

virtual GetConfig(google::cloud::speech::v2::GetConfigRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::GetConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::speech::v2::Config >

virtual UpdateConfig(google::cloud::speech::v2::UpdateConfigRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::UpdateConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::speech::v2::Config >

virtual CreateCustomClass(google::cloud::speech::v2::CreateCustomClassRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::CreateCustomClassRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::CustomClass > >

virtual CreateCustomClass(NoAwaitTag, google::cloud::speech::v2::CreateCustomClassRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::CustomClass > >

virtual ListCustomClasses(google::cloud::speech::v2::ListCustomClassesRequest)

Parameter
Name Description
request google::cloud::speech::v2::ListCustomClassesRequest
Returns
Type Description
StreamRange< google::cloud::speech::v2::CustomClass >

virtual GetCustomClass(google::cloud::speech::v2::GetCustomClassRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::GetCustomClassRequest const &
Returns
Type Description
StatusOr< google::cloud::speech::v2::CustomClass >

virtual UpdateCustomClass(google::cloud::speech::v2::UpdateCustomClassRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::UpdateCustomClassRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::CustomClass > >

virtual UpdateCustomClass(NoAwaitTag, google::cloud::speech::v2::UpdateCustomClassRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::CustomClass > >

virtual DeleteCustomClass(google::cloud::speech::v2::DeleteCustomClassRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::DeleteCustomClassRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::CustomClass > >

virtual DeleteCustomClass(NoAwaitTag, google::cloud::speech::v2::DeleteCustomClassRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::CustomClass > >

virtual UndeleteCustomClass(google::cloud::speech::v2::UndeleteCustomClassRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::UndeleteCustomClassRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::CustomClass > >

virtual UndeleteCustomClass(NoAwaitTag, google::cloud::speech::v2::UndeleteCustomClassRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::CustomClass > >

virtual CreatePhraseSet(google::cloud::speech::v2::CreatePhraseSetRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::CreatePhraseSetRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::PhraseSet > >

virtual CreatePhraseSet(NoAwaitTag, google::cloud::speech::v2::CreatePhraseSetRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::PhraseSet > >

virtual ListPhraseSets(google::cloud::speech::v2::ListPhraseSetsRequest)

Parameter
Name Description
request google::cloud::speech::v2::ListPhraseSetsRequest
Returns
Type Description
StreamRange< google::cloud::speech::v2::PhraseSet >

virtual GetPhraseSet(google::cloud::speech::v2::GetPhraseSetRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::GetPhraseSetRequest const &
Returns
Type Description
StatusOr< google::cloud::speech::v2::PhraseSet >

virtual UpdatePhraseSet(google::cloud::speech::v2::UpdatePhraseSetRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::UpdatePhraseSetRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::PhraseSet > >

virtual UpdatePhraseSet(NoAwaitTag, google::cloud::speech::v2::UpdatePhraseSetRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::PhraseSet > >

virtual DeletePhraseSet(google::cloud::speech::v2::DeletePhraseSetRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::DeletePhraseSetRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::PhraseSet > >

virtual DeletePhraseSet(NoAwaitTag, google::cloud::speech::v2::DeletePhraseSetRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::PhraseSet > >

virtual UndeletePhraseSet(google::cloud::speech::v2::UndeletePhraseSetRequest const &)

Parameter
Name Description
request google::cloud::speech::v2::UndeletePhraseSetRequest const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::PhraseSet > >

virtual UndeletePhraseSet(NoAwaitTag, google::cloud::speech::v2::UndeletePhraseSetRequest const &)

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

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::speech::v2::PhraseSet > >