# Cloud Text-to-Speech V1 API - Class Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client (v1.19.0)

1.19.0 (latest) 1.18.0 1.17.0 1.16.0 1.15.1 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.1 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.13.0 0.12.2 0.11.1 0.10.1 0.9.1 0.8.0 0.7.0 0.6.0 0.5.2 Reference documentation and code samples for the Cloud Text-to-Speech V1 API class Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.

Client for the TextToSpeechLongAudioSynthesize service.


<br />

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

## Inherits

- Object

## Includes

- [Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Paths)

## Methods

### .configure

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

Configure the TextToSpeechLongAudioSynthesize Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client-Configuration "Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all TextToSpeechLongAudioSynthesize clients
::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client#Google__Cloud__TextToSpeech__V1__TextToSpeechLongAudioSynthesize__Client_configure_class_ "Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client-Configuration "Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client-Configuration))

### #initialize

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

Create a new TextToSpeechLongAudioSynthesize client object.
**Yields**

- (config) --- Configure the TextToSpeechLongAudioSynthesize client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new

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

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #operations_client

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

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-TextToSpeechLongAudioSynthesize-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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-SynthesizeLongAudioRequest "Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-SynthesisInput), ::Hash) --- Required. The Synthesizer requires either plain text or SSML as input.
- **audio_config** ([::Google::Cloud::TextToSpeech::V1::AudioConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-VoiceSelectionParams), ::Hash) --- Required. The desired voice of the synthesized audio.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/text_to_speech/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new

# Call the synthesize_long_audio method.
result = client.synthesize_long_audio request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)