# Google Cloud Text-to-Speech v1 API - Class TextToSpeechClientImpl (3.18.0)

3.18.0 (latest) 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.5.0 2.4.0 2.3.0 2.2.0

    public sealed class TextToSpeechClientImpl : TextToSpeechClient

Reference documentation and code samples for the Google Cloud Text-to-Speech v1 API class TextToSpeechClientImpl.

TextToSpeech client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [TextToSpeechClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient) \> TextToSpeechClientImpl

## Inherited Members

[TextToSpeechClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_DefaultEndpoint) [TextToSpeechClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_DefaultScopes) [TextToSpeechClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_ServiceMetadata) [TextToSpeechClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_CreateAsync_System_Threading_CancellationToken_) [TextToSpeechClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_Create) [TextToSpeechClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_ShutdownDefaultChannelsAsync) [TextToSpeechClient.ListVoicesAsync(ListVoicesRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_ListVoicesAsync_Google_Cloud_TextToSpeech_V1_ListVoicesRequest_System_Threading_CancellationToken_) [TextToSpeechClient.ListVoices(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_ListVoices_System_String_Google_Api_Gax_Grpc_CallSettings_) [TextToSpeechClient.ListVoicesAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_ListVoicesAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [TextToSpeechClient.ListVoicesAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_ListVoicesAsync_System_String_System_Threading_CancellationToken_) [TextToSpeechClient.SynthesizeSpeechAsync(SynthesizeSpeechRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_SynthesizeSpeechAsync_Google_Cloud_TextToSpeech_V1_SynthesizeSpeechRequest_System_Threading_CancellationToken_) [TextToSpeechClient.SynthesizeSpeech(SynthesisInput, VoiceSelectionParams, AudioConfig, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_SynthesizeSpeech_Google_Cloud_TextToSpeech_V1_SynthesisInput_Google_Cloud_TextToSpeech_V1_VoiceSelectionParams_Google_Cloud_TextToSpeech_V1_AudioConfig_Google_Api_Gax_Grpc_CallSettings_) [TextToSpeechClient.SynthesizeSpeechAsync(SynthesisInput, VoiceSelectionParams, AudioConfig, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_SynthesizeSpeechAsync_Google_Cloud_TextToSpeech_V1_SynthesisInput_Google_Cloud_TextToSpeech_V1_VoiceSelectionParams_Google_Cloud_TextToSpeech_V1_AudioConfig_Google_Api_Gax_Grpc_CallSettings_) [TextToSpeechClient.SynthesizeSpeechAsync(SynthesisInput, VoiceSelectionParams, AudioConfig, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_SynthesizeSpeechAsync_Google_Cloud_TextToSpeech_V1_SynthesisInput_Google_Cloud_TextToSpeech_V1_VoiceSelectionParams_Google_Cloud_TextToSpeech_V1_AudioConfig_System_Threading_CancellationToken_) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.TextToSpeech.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1)

## Assembly

Google.Cloud.TextToSpeech.V1.dll

## Remarks

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

## Constructors

### TextToSpeechClientImpl(TextToSpeechClient, TextToSpeechSettings, ILogger)

    public TextToSpeechClientImpl(TextToSpeech.TextToSpeechClient grpcClient, TextToSpeechSettings settings, ILogger logger)

Constructs a client wrapper for the TextToSpeech service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeech.TextToSpeechClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechSettings` The base [TextToSpeechSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override TextToSpeech.TextToSpeechClient GrpcClient { get; }

The underlying gRPC TextToSpeech client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeech.TextToSpeechClient` |   |

**Overrides** [TextToSpeechClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_GrpcClient)

## Methods

### ListVoices(ListVoicesRequest, CallSettings)

    public override ListVoicesResponse ListVoices(ListVoicesRequest request, CallSettings callSettings = null)

Returns a list of Voice supported for synthesis.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.ListVoicesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.ListVoicesResponse` | The RPC response. |

**Overrides** [TextToSpeechClient.ListVoices(ListVoicesRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_ListVoices_Google_Cloud_TextToSpeech_V1_ListVoicesRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListVoicesAsync(ListVoicesRequest, CallSettings)

    public override Task<ListVoicesResponse> ListVoicesAsync(ListVoicesRequest request, CallSettings callSettings = null)

Returns a list of Voice supported for synthesis.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.ListVoicesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.ListVoicesResponse` | A Task containing the RPC response. |

**Overrides** [TextToSpeechClient.ListVoicesAsync(ListVoicesRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_ListVoicesAsync_Google_Cloud_TextToSpeech_V1_ListVoicesRequest_Google_Api_Gax_Grpc_CallSettings_)

### StreamingSynthesize(CallSettings, BidirectionalStreamingSettings)

    public override TextToSpeechClient.StreamingSynthesizeStream StreamingSynthesize(CallSettings callSettings = null, BidirectionalStreamingSettings streamingSettings = null)

Performs bidirectional streaming speech synthesis: receives audio while
sending text.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |
| `streamingSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.BidirectionalStreamingSettings.html` If not null, applies streaming overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient.StreamingSynthesizeStream` | The client-server stream. |

**Overrides** [TextToSpeechClient.StreamingSynthesize(CallSettings, BidirectionalStreamingSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_StreamingSynthesize_Google_Api_Gax_Grpc_CallSettings_Google_Api_Gax_Grpc_BidirectionalStreamingSettings_)

### SynthesizeSpeech(SynthesizeSpeechRequest, CallSettings)

    public override SynthesizeSpeechResponse SynthesizeSpeech(SynthesizeSpeechRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.SynthesizeSpeechRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.SynthesizeSpeechResponse` | The RPC response. |

**Overrides** [TextToSpeechClient.SynthesizeSpeech(SynthesizeSpeechRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_SynthesizeSpeech_Google_Cloud_TextToSpeech_V1_SynthesizeSpeechRequest_Google_Api_Gax_Grpc_CallSettings_)

### SynthesizeSpeechAsync(SynthesizeSpeechRequest, CallSettings)

    public override Task<SynthesizeSpeechResponse> SynthesizeSpeechAsync(SynthesizeSpeechRequest request, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.SynthesizeSpeechRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.SynthesizeSpeechResponse` | A Task containing the RPC response. |

**Overrides** [TextToSpeechClient.SynthesizeSpeechAsync(SynthesizeSpeechRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.TextToSpeechClient#Google_Cloud_TextToSpeech_V1_TextToSpeechClient_SynthesizeSpeechAsync_Google_Cloud_TextToSpeech_V1_SynthesizeSpeechRequest_Google_Api_Gax_Grpc_CallSettings_)