Cloud Speech-to-Text V2 API - Class Google::Cloud::Speech::V2::Speech::Rest::ServiceStub (v0.2.0)

Reference documentation and code samples for the Cloud Speech-to-Text V2 API class Google::Cloud::Speech::V2::Speech::Rest::ServiceStub.

REST service stub for the Speech service. Service stub contains baseline method implementations including transcoding, making the REST call, and deserialing the response.

Inherits

  • Object

Methods

#batch_recognize

def batch_recognize(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the batch_recognize REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#create_custom_class

def create_custom_class(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the create_custom_class REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#create_phrase_set

def create_phrase_set(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the create_phrase_set REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#create_recognizer

def create_recognizer(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the create_recognizer REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#delete_custom_class

def delete_custom_class(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the delete_custom_class REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#delete_phrase_set

def delete_phrase_set(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the delete_phrase_set REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#delete_recognizer

def delete_recognizer(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the delete_recognizer REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_config

def get_config(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::Config

Baseline implementation for the get_config REST call

Parameters
  • request_pb (::Google::Cloud::Speech::V2::GetConfigRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_custom_class

def get_custom_class(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::CustomClass

Baseline implementation for the get_custom_class REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_phrase_set

def get_phrase_set(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::PhraseSet

Baseline implementation for the get_phrase_set REST call

Parameters
  • request_pb (::Google::Cloud::Speech::V2::GetPhraseSetRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_recognizer

def get_recognizer(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::Recognizer

Baseline implementation for the get_recognizer REST call

Parameters
  • request_pb (::Google::Cloud::Speech::V2::GetRecognizerRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#initialize

def initialize(endpoint:, credentials:) -> ServiceStub
Returns

#list_custom_classes

def list_custom_classes(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::ListCustomClassesResponse

Baseline implementation for the list_custom_classes REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#list_phrase_sets

def list_phrase_sets(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::ListPhraseSetsResponse

Baseline implementation for the list_phrase_sets REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#list_recognizers

def list_recognizers(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::ListRecognizersResponse

Baseline implementation for the list_recognizers REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#recognize

def recognize(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::RecognizeResponse

Baseline implementation for the recognize REST call

Parameters
  • request_pb (::Google::Cloud::Speech::V2::RecognizeRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#undelete_custom_class

def undelete_custom_class(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the undelete_custom_class REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#undelete_phrase_set

def undelete_phrase_set(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the undelete_phrase_set REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#undelete_recognizer

def undelete_recognizer(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the undelete_recognizer REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#update_config

def update_config(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Speech::V2::Config

Baseline implementation for the update_config REST call

Parameters
  • request_pb (::Google::Cloud::Speech::V2::UpdateConfigRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#update_custom_class

def update_custom_class(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the update_custom_class REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#update_phrase_set

def update_phrase_set(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the update_phrase_set REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#update_recognizer

def update_recognizer(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the update_recognizer REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)