Class SynthesisInput

  • All Implemented Interfaces:
    SynthesisInputOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class SynthesisInput
    extends com.google.protobuf.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][google.rpc.Code.INVALID_ARGUMENT]. The
     input size is limited to 5000 bytes.
     
    Protobuf type google.cloud.texttospeech.v1.SynthesisInput
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SynthesisInput.Builder
      Contains text input to be synthesized.
      static class  SynthesisInput.InputSourceCase  
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SSML_FIELD_NUMBER  
      static int TEXT_FIELD_NUMBER  
      • Fields inherited from class com.google.protobuf.GeneratedMessageV3

        alwaysUseFieldBuilders, unknownFields
      • Fields inherited from class com.google.protobuf.AbstractMessage

        memoizedSize
      • Fields inherited from class com.google.protobuf.AbstractMessageLite

        memoizedHashCode
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasText

        public boolean hasText()
         The raw text to be synthesized.
         
        string text = 1;
        Specified by:
        hasText in interface SynthesisInputOrBuilder
        Returns:
        Whether the text field is set.
      • getTextBytes

        public com.google.protobuf.ByteString getTextBytes()
         The raw text to be synthesized.
         
        string text = 1;
        Specified by:
        getTextBytes in interface SynthesisInputOrBuilder
        Returns:
        The bytes for text.
      • 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][google.rpc.Code.INVALID_ARGUMENT]. For
         more information, see
         [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
         
        string ssml = 2;
        Specified by:
        hasSsml in interface SynthesisInputOrBuilder
        Returns:
        Whether the ssml field is set.
      • 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][google.rpc.Code.INVALID_ARGUMENT]. For
         more information, see
         [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
         
        string ssml = 2;
        Specified by:
        getSsml in interface SynthesisInputOrBuilder
        Returns:
        The ssml.
      • getSsmlBytes

        public com.google.protobuf.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][google.rpc.Code.INVALID_ARGUMENT]. For
         more information, see
         [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
         
        string ssml = 2;
        Specified by:
        getSsmlBytes in interface SynthesisInputOrBuilder
        Returns:
        The bytes for ssml.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static SynthesisInput parseFrom​(ByteBuffer data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SynthesisInput parseFrom​(ByteBuffer data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SynthesisInput parseFrom​(com.google.protobuf.ByteString data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SynthesisInput parseFrom​(com.google.protobuf.ByteString data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SynthesisInput parseFrom​(byte[] data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SynthesisInput parseFrom​(byte[] data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SynthesisInput parseFrom​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws IOException
        Throws:
        IOException
      • newBuilderForType

        public SynthesisInput.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public SynthesisInput.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected SynthesisInput.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static SynthesisInput getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<SynthesisInput> parser()
      • getParserForType

        public com.google.protobuf.Parser<SynthesisInput> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public SynthesisInput getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder