Cloud Text-to-Speech V1 API - Class Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client (v0.10.1)

Reference documentation and code samples for the Cloud Text-to-Speech V1 API class Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.

REST client for the TextToSpeechLongAudioSynthesize service.

Service that implements Google Cloud Text-to-Speech API.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the TextToSpeechLongAudioSynthesize Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all TextToSpeechLongAudioSynthesize clients
::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the TextToSpeechLongAudioSynthesize Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#initialize

def initialize() { |config| ... } -> Client

Create a new TextToSpeechLongAudioSynthesize REST client object.

Yields
  • (config) — Configure the TextToSpeechLongAudioSynthesize client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config|
  config.timeout = 10.0
end

#operations_client

def operations_client() -> ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Operations

Get the associated client for long-running operations.

#synthesize_long_audio

def synthesize_long_audio(request, options = nil) -> ::Gapic::Operation
def synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) -> ::Gapic::Operation

Synthesizes long form text asynchronously.

Overloads
def synthesize_long_audio(request, options = nil) -> ::Gapic::Operation
Pass arguments to synthesize_long_audio via a request object, either of type SynthesizeLongAudioRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) -> ::Gapic::Operation
Pass arguments to synthesize_long_audio via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — The resource states of the request in the form of projects/*/locations/*.
  • input (::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash) — Required. The Synthesizer requires either plain text or SSML as input. While Long Audio is in preview, SSML is temporarily unsupported.
  • audio_config (::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash) — Required. The configuration of the synthesized audio.
  • output_gcs_uri (::String) — Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: gs://bucket_name/object_name, and the bucket must already exist.
  • voice (::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash) — Required. The desired voice of the synthesized audio.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.