Cloud Speech-to-Text V1 API - Class Google::Cloud::Speech::V1::Speech::Rest::ServiceStub (v0.15.0)

Reference documentation and code samples for the Cloud Speech-to-Text V1 API class Google::Cloud::Speech::V1::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

#initialize

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

#long_running_recognize

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

Baseline implementation for the long_running_recognize 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::V1::RecognizeResponse

Baseline implementation for the recognize REST call

Parameters
  • request_pb (::Google::Cloud::Speech::V1::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)