Google Cloud Text-to-Speech v1beta1 API - Class TextToSpeech.TextToSpeechClient (2.0.0-beta07)

public class TextToSpeech.TextToSpeechClient : ClientBase<TextToSpeech.TextToSpeechClient>

Reference documentation and code samples for the Google Cloud Text-to-Speech v1beta1 API class TextToSpeech.TextToSpeechClient.

Client for TextToSpeech

Inheritance

object > ClientBase > ClientBaseTextToSpeechTextToSpeechClient > TextToSpeech.TextToSpeechClient

Namespace

Google.Cloud.TextToSpeech.V1Beta1

Assembly

Google.Cloud.TextToSpeech.V1Beta1.dll

Constructors

TextToSpeechClient()

protected TextToSpeechClient()

Protected parameterless constructor to allow creation of test doubles.

TextToSpeechClient(CallInvoker)

public TextToSpeechClient(CallInvoker callInvoker)

Creates a new client for TextToSpeech that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

TextToSpeechClient(ChannelBase)

public TextToSpeechClient(ChannelBase channel)

Creates a new client for TextToSpeech

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

TextToSpeechClient(ClientBaseConfiguration)

protected TextToSpeechClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

ListVoices(ListVoicesRequest, CallOptions)

public virtual ListVoicesResponse ListVoices(ListVoicesRequest request, CallOptions options)

Returns a list of Voice supported for synthesis.

Parameters
Name Description
request ListVoicesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListVoicesResponse

The response received from the server.

ListVoices(ListVoicesRequest, Metadata, DateTime?, CancellationToken)

public virtual ListVoicesResponse ListVoices(ListVoicesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a list of Voice supported for synthesis.

Parameters
Name Description
request ListVoicesRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListVoicesResponse

The response received from the server.

ListVoicesAsync(ListVoicesRequest, CallOptions)

public virtual AsyncUnaryCall<ListVoicesResponse> ListVoicesAsync(ListVoicesRequest request, CallOptions options)

Returns a list of Voice supported for synthesis.

Parameters
Name Description
request ListVoicesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListVoicesResponse

The call object.

ListVoicesAsync(ListVoicesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListVoicesResponse> ListVoicesAsync(ListVoicesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a list of Voice supported for synthesis.

Parameters
Name Description
request ListVoicesRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListVoicesResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override TextToSpeech.TextToSpeechClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
TextToSpeechTextToSpeechClient
Overrides

SynthesizeSpeech(SynthesizeSpeechRequest, CallOptions)

public virtual SynthesizeSpeechResponse SynthesizeSpeech(SynthesizeSpeechRequest request, CallOptions options)

Synthesizes speech synchronously: receive results after all text input has been processed.

Parameters
Name Description
request SynthesizeSpeechRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
SynthesizeSpeechResponse

The response received from the server.

SynthesizeSpeech(SynthesizeSpeechRequest, Metadata, DateTime?, CancellationToken)

public virtual SynthesizeSpeechResponse SynthesizeSpeech(SynthesizeSpeechRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Synthesizes speech synchronously: receive results after all text input has been processed.

Parameters
Name Description
request SynthesizeSpeechRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
SynthesizeSpeechResponse

The response received from the server.

SynthesizeSpeechAsync(SynthesizeSpeechRequest, CallOptions)

public virtual AsyncUnaryCall<SynthesizeSpeechResponse> SynthesizeSpeechAsync(SynthesizeSpeechRequest request, CallOptions options)

Synthesizes speech synchronously: receive results after all text input has been processed.

Parameters
Name Description
request SynthesizeSpeechRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallSynthesizeSpeechResponse

The call object.

SynthesizeSpeechAsync(SynthesizeSpeechRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SynthesizeSpeechResponse> SynthesizeSpeechAsync(SynthesizeSpeechRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Synthesizes speech synchronously: receive results after all text input has been processed.

Parameters
Name Description
request SynthesizeSpeechRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallSynthesizeSpeechResponse

The call object.