Class SynthesisInput (2.17.0)

public final class SynthesisInput extends GeneratedMessageV3 implements SynthesisInputOrBuilder

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.

Protobuf type google.cloud.texttospeech.v1beta1.SynthesisInput

Static Fields

SSML_FIELD_NUMBER

public static final int SSML_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SynthesisInput getDefaultInstance()
Returns
TypeDescription
SynthesisInput

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static SynthesisInput.Builder newBuilder()
Returns
TypeDescription
SynthesisInput.Builder

newBuilder(SynthesisInput prototype)

public static SynthesisInput.Builder newBuilder(SynthesisInput prototype)
Parameter
NameDescription
prototypeSynthesisInput
Returns
TypeDescription
SynthesisInput.Builder

parseDelimitedFrom(InputStream input)

public static SynthesisInput parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SynthesisInput parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static SynthesisInput parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SynthesisInput parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SynthesisInput parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SynthesisInput parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SynthesisInput parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SynthesisInput parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static SynthesisInput parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SynthesisInput parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static SynthesisInput parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SynthesisInput parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SynthesisInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<SynthesisInput> parser()
Returns
TypeDescription
Parser<SynthesisInput>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public SynthesisInput getDefaultInstanceForType()
Returns
TypeDescription
SynthesisInput

getInputSourceCase()

public SynthesisInput.InputSourceCase getInputSourceCase()
Returns
TypeDescription
SynthesisInput.InputSourceCase

getParserForType()

public Parser<SynthesisInput> getParserForType()
Returns
TypeDescription
Parser<SynthesisInput>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSsml()

public String 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.

string ssml = 2;

Returns
TypeDescription
String

The ssml.

getSsmlBytes()

public ByteString getSsmlBytes()

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.

string ssml = 2;

Returns
TypeDescription
ByteString

The bytes for ssml.

getText()

public String getText()

The raw text to be synthesized.

string text = 1;

Returns
TypeDescription
String

The text.

getTextBytes()

public ByteString getTextBytes()

The raw text to be synthesized.

string text = 1;

Returns
TypeDescription
ByteString

The bytes for text.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasSsml()

public boolean hasSsml()

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.

string ssml = 2;

Returns
TypeDescription
boolean

Whether the ssml field is set.

hasText()

public boolean hasText()

The raw text to be synthesized.

string text = 1;

Returns
TypeDescription
boolean

Whether the text field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public SynthesisInput.Builder newBuilderForType()
Returns
TypeDescription
SynthesisInput.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SynthesisInput.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
SynthesisInput.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public SynthesisInput.Builder toBuilder()
Returns
TypeDescription
SynthesisInput.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException