Reference documentation and code samples for the Cloud Text-to-Speech V1 Client 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. The
input size is limited to 5000 bytes.
Generated from protobuf message google.cloud.texttospeech.v1.SynthesisInput
Namespace
Google \ Cloud \ TextToSpeech \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ text |
string
The raw text to be synthesized. |
↳ ssml |
string
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. For more information, see SSML. |
↳ multi_speaker_markup |
Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup
The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis. |
↳ custom_pronunciations |
Google\Cloud\TextToSpeech\V1\CustomPronunciations
Optional. The pronunciation customizations to be applied to the input. If this is set, the input will be synthesized using the given pronunciation customizations. The initial support will be for EFIGS (English, French, Italian, German, Spanish) languages, as provided in VoiceSelectionParams. Journey and Instant Clone voices are not supported yet. 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 (entirely or partially). |
getText
The raw text to be synthesized.
Returns | |
---|---|
Type | Description |
string |
hasText
setText
The raw text to be synthesized.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSsml
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. For more information, see SSML.
Returns | |
---|---|
Type | Description |
string |
hasSsml
setSsml
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. For more information, see SSML.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getMultiSpeakerMarkup
The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis.
Returns | |
---|---|
Type | Description |
Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup|null |
hasMultiSpeakerMarkup
setMultiSpeakerMarkup
The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup
|
Returns | |
---|---|
Type | Description |
$this |
getCustomPronunciations
Optional. The pronunciation customizations to be applied to the input. If this is set, the input will be synthesized using the given pronunciation customizations.
The initial support will be for EFIGS (English, French, Italian, German, Spanish) languages, as provided in VoiceSelectionParams. Journey and Instant Clone voices are not supported yet. 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 (entirely or partially).
Returns | |
---|---|
Type | Description |
Google\Cloud\TextToSpeech\V1\CustomPronunciations|null |
hasCustomPronunciations
clearCustomPronunciations
setCustomPronunciations
Optional. The pronunciation customizations to be applied to the input. If this is set, the input will be synthesized using the given pronunciation customizations.
The initial support will be for EFIGS (English, French, Italian, German, Spanish) languages, as provided in VoiceSelectionParams. Journey and Instant Clone voices are not supported yet. 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 (entirely or partially).
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\TextToSpeech\V1\CustomPronunciations
|
Returns | |
---|---|
Type | Description |
$this |
getInputSource
Returns | |
---|---|
Type | Description |
string |