Class StreamingAudioConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StreamingAudioConfig.Builder>
com.google.cloud.texttospeech.v1.StreamingAudioConfig.Builder
All Implemented Interfaces:
StreamingAudioConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
StreamingAudioConfig

public static final class StreamingAudioConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<StreamingAudioConfig.Builder> implements StreamingAudioConfigOrBuilder
 Description of the desired output audio data.
 
Protobuf type google.cloud.texttospeech.v1.StreamingAudioConfig
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<StreamingAudioConfig.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<StreamingAudioConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<StreamingAudioConfig.Builder>
    • getDefaultInstanceForType

      public StreamingAudioConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public StreamingAudioConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public StreamingAudioConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public StreamingAudioConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StreamingAudioConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<StreamingAudioConfig.Builder>
    • mergeFrom

      public StreamingAudioConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StreamingAudioConfig.Builder>
      Throws:
      IOException
    • getAudioEncodingValue

      public int getAudioEncodingValue()
       Required. The format of the audio byte stream.
       Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings
       return an error.
       
      .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAudioEncodingValue in interface StreamingAudioConfigOrBuilder
      Returns:
      The enum numeric value on the wire for audioEncoding.
    • setAudioEncodingValue

      public StreamingAudioConfig.Builder setAudioEncodingValue(int value)
       Required. The format of the audio byte stream.
       Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings
       return an error.
       
      .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for audioEncoding to set.
      Returns:
      This builder for chaining.
    • getAudioEncoding

      public AudioEncoding getAudioEncoding()
       Required. The format of the audio byte stream.
       Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings
       return an error.
       
      .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAudioEncoding in interface StreamingAudioConfigOrBuilder
      Returns:
      The audioEncoding.
    • setAudioEncoding

      public StreamingAudioConfig.Builder setAudioEncoding(AudioEncoding value)
       Required. The format of the audio byte stream.
       Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings
       return an error.
       
      .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The audioEncoding to set.
      Returns:
      This builder for chaining.
    • clearAudioEncoding

      public StreamingAudioConfig.Builder clearAudioEncoding()
       Required. The format of the audio byte stream.
       Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings
       return an error.
       
      .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getSampleRateHertz

      public int getSampleRateHertz()
       Optional. The synthesis sample rate (in hertz) for this audio.
       
      int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSampleRateHertz in interface StreamingAudioConfigOrBuilder
      Returns:
      The sampleRateHertz.
    • setSampleRateHertz

      public StreamingAudioConfig.Builder setSampleRateHertz(int value)
       Optional. The synthesis sample rate (in hertz) for this audio.
       
      int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The sampleRateHertz to set.
      Returns:
      This builder for chaining.
    • clearSampleRateHertz

      public StreamingAudioConfig.Builder clearSampleRateHertz()
       Optional. The synthesis sample rate (in hertz) for this audio.
       
      int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getSpeakingRate

      public double getSpeakingRate()
       Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is
       the normal native speed supported by the specific voice. 2.0 is twice as
       fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0
       speed. Any other values < 0.25 or > 2.0 will return an error.
       
      double speaking_rate = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSpeakingRate in interface StreamingAudioConfigOrBuilder
      Returns:
      The speakingRate.
    • setSpeakingRate

      public StreamingAudioConfig.Builder setSpeakingRate(double value)
       Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is
       the normal native speed supported by the specific voice. 2.0 is twice as
       fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0
       speed. Any other values < 0.25 or > 2.0 will return an error.
       
      double speaking_rate = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The speakingRate to set.
      Returns:
      This builder for chaining.
    • clearSpeakingRate

      public StreamingAudioConfig.Builder clearSpeakingRate()
       Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is
       the normal native speed supported by the specific voice. 2.0 is twice as
       fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0
       speed. Any other values < 0.25 or > 2.0 will return an error.
       
      double speaking_rate = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.