Class TextToSpeech.TextToSpeechClient (2.3.0)

public class TextToSpeechClient : ClientBase<TextToSpeech.TextToSpeechClient>

Client for TextToSpeech

Inheritance

Object > ClientBase > ClientBase<TextToSpeech.TextToSpeechClient> > TextToSpeech.TextToSpeechClient

Namespace

Google.Cloud.TextToSpeech.V1

Assembly

Google.Cloud.TextToSpeech.V1.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

TextToSpeechClient(Channel)

[Obsolete("This constructor overload is present for compatibility only, and will be removed in the next major version")]
public TextToSpeechClient(Channel channel)

Creates a new client using a channel.

Parameter
NameDescription
channelGrpc.Core.Channel

The channel to use to make remote calls.

TextToSpeechClient(ChannelBase)

public TextToSpeechClient(ChannelBase channel)

Creates a new client for TextToSpeech

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

TextToSpeechClient(ClientBase.ClientBaseConfiguration)

protected TextToSpeechClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

ListVoices(ListVoicesRequest, CallOptions)

public virtual ListVoicesResponse ListVoices(ListVoicesRequest request, CallOptions options)

Returns a list of Voice supported for synthesis.

Parameters
NameDescription
requestListVoicesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListVoicesResponse

The response received from the server.

ListVoices(ListVoicesRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Returns a list of Voice supported for synthesis.

Parameters
NameDescription
requestListVoicesRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListVoicesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListVoicesResponse>

The call object.

ListVoicesAsync(ListVoicesRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Returns a list of Voice supported for synthesis.

Parameters
NameDescription
requestListVoicesRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ListVoicesResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
TextToSpeech.TextToSpeechClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.TextToSpeech.V1.TextToSpeech.TextToSpeechClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

SynthesizeSpeech(SynthesizeSpeechRequest, CallOptions)

public virtual SynthesizeSpeechResponse SynthesizeSpeech(SynthesizeSpeechRequest request, CallOptions options)

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

Parameters
NameDescription
requestSynthesizeSpeechRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SynthesizeSpeechResponse

The response received from the server.

SynthesizeSpeech(SynthesizeSpeechRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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

Parameters
NameDescription
requestSynthesizeSpeechRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSynthesizeSpeechRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<SynthesizeSpeechResponse>

The call object.

SynthesizeSpeechAsync(SynthesizeSpeechRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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

Parameters
NameDescription
requestSynthesizeSpeechRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<SynthesizeSpeechResponse>

The call object.