# Google Cloud Text-to-Speech v1 API - Class SynthesisInput (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 SynthesisInput : IMessage<SynthesisInput>, IEquatable<SynthesisInput>, IDeepCloneable<SynthesisInput>, IBufferMessage, IMessage

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

Contains text input to be synthesized. Either `text` or `ssml` must be
supplied. Supplying both or neither returns
\[google.rpc.Code.INVALID_ARGUMENT\]\[google.rpc.Code.INVALID_ARGUMENT\]. The
input size is limited to 5000 bytes.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> SynthesisInput

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SynthesisInput](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.SynthesisInput), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SynthesisInput](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.SynthesisInput), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SynthesisInput](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.SynthesisInput), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[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

## Constructors

### SynthesisInput()

    public SynthesisInput()

### SynthesisInput(SynthesisInput)

    public SynthesisInput(SynthesisInput other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.SynthesisInput` |

## Properties

### CustomPronunciations

    public CustomPronunciations CustomPronunciations { get; set; }

Optional. The pronunciation customizations are applied to the input. If
this is set, the input is synthesized using the given pronunciation
customizations.

The initial support is for en-us, with plans to expand to other locales in
the future. Instant Clone voices aren't supported.

In order to customize the pronunciation of a phrase, there must be an exact
match of the phrase in the input types. If using SSML, the phrase must not
be inside a phoneme tag.

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

### HasMarkup

    public bool HasMarkup { get; }

Gets whether the "markup" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasPrompt

    public bool HasPrompt { get; }

Gets whether the "prompt" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasSsml

    public bool HasSsml { get; }

Gets whether the "ssml" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasText

    public bool HasText { get; }

Gets whether the "text" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### InputSourceCase

    public SynthesisInput.InputSourceOneofCase InputSourceCase { get; }

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

### Markup

    public string Markup { get; set; }

Markup for Chirp 3: HD voices specifically. This field may not be used
with any other voices.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### MultiSpeakerMarkup

    public MultiSpeakerMarkup MultiSpeakerMarkup { get; set; }

The multi-speaker input to be synthesized. Only applicable for
multi-speaker synthesis.

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

### Prompt

    public string Prompt { get; set; }

This system instruction is supported only for controllable/promptable voice
models. If this system instruction is used, we pass the unedited text to
Gemini-TTS. Otherwise, a default system instruction is used. AI Studio
calls this system instruction, Style Instructions.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Ssml

    public string Ssml { get; set; }

The SSML document to be synthesized. The SSML document must be valid
and well-formed. Otherwise the RPC will fail and return
\[google.rpc.Code.INVALID_ARGUMENT\]\[google.rpc.Code.INVALID_ARGUMENT\]. For
more information, see
[SSML](https://cloud.google.com/text-to-speech/docs/ssml).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Text

    public string Text { get; set; }

The raw text to be synthesized.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |