Class TextToSpeechSettings.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TextToSpeechSettings.Builder>
com.google.cloud.dialogflow.v2.TextToSpeechSettings.Builder
All Implemented Interfaces:
TextToSpeechSettingsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TextToSpeechSettings

public static final class TextToSpeechSettings.Builder extends com.google.protobuf.GeneratedMessage.Builder<TextToSpeechSettings.Builder> implements TextToSpeechSettingsOrBuilder
 Instructs the speech synthesizer on how to generate the output audio content.
 
Protobuf type google.cloud.dialogflow.v2.TextToSpeechSettings
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<TextToSpeechSettings.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<TextToSpeechSettings.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TextToSpeechSettings.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<TextToSpeechSettings.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<TextToSpeechSettings.Builder>
    • getDefaultInstanceForType

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

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

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

      public TextToSpeechSettings.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<TextToSpeechSettings.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<TextToSpeechSettings.Builder>
    • mergeFrom

      public TextToSpeechSettings.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<TextToSpeechSettings.Builder>
      Throws:
      IOException
    • getEnableTextToSpeech

      public boolean getEnableTextToSpeech()
       Optional. Indicates whether text to speech is enabled. Even when this field
       is false, other settings in this proto are still retained.
       
      bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEnableTextToSpeech in interface TextToSpeechSettingsOrBuilder
      Returns:
      The enableTextToSpeech.
    • setEnableTextToSpeech

      public TextToSpeechSettings.Builder setEnableTextToSpeech(boolean value)
       Optional. Indicates whether text to speech is enabled. Even when this field
       is false, other settings in this proto are still retained.
       
      bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enableTextToSpeech to set.
      Returns:
      This builder for chaining.
    • clearEnableTextToSpeech

      public TextToSpeechSettings.Builder clearEnableTextToSpeech()
       Optional. Indicates whether text to speech is enabled. Even when this field
       is false, other settings in this proto are still retained.
       
      bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getOutputAudioEncodingValue

      public int getOutputAudioEncodingValue()
       Required. Audio encoding of the synthesized audio content.
       
      .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOutputAudioEncodingValue in interface TextToSpeechSettingsOrBuilder
      Returns:
      The enum numeric value on the wire for outputAudioEncoding.
    • setOutputAudioEncodingValue

      public TextToSpeechSettings.Builder setOutputAudioEncodingValue(int value)
       Required. Audio encoding of the synthesized audio content.
       
      .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for outputAudioEncoding to set.
      Returns:
      This builder for chaining.
    • getOutputAudioEncoding

      public OutputAudioEncoding getOutputAudioEncoding()
       Required. Audio encoding of the synthesized audio content.
       
      .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOutputAudioEncoding in interface TextToSpeechSettingsOrBuilder
      Returns:
      The outputAudioEncoding.
    • setOutputAudioEncoding

      public TextToSpeechSettings.Builder setOutputAudioEncoding(OutputAudioEncoding value)
       Required. Audio encoding of the synthesized audio content.
       
      .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The outputAudioEncoding to set.
      Returns:
      This builder for chaining.
    • clearOutputAudioEncoding

      public TextToSpeechSettings.Builder clearOutputAudioEncoding()
       Required. Audio encoding of the synthesized audio content.
       
      .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getSampleRateHertz

      public int getSampleRateHertz()
       Optional. The synthesis sample rate (in hertz) for this audio. If not
       provided, then the synthesizer will use the default sample rate based on
       the audio encoding. If this is different from the voice's natural sample
       rate, then the synthesizer will honor this request by converting to the
       desired sample rate (which might result in worse audio quality).
       
      int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSampleRateHertz in interface TextToSpeechSettingsOrBuilder
      Returns:
      The sampleRateHertz.
    • setSampleRateHertz

      public TextToSpeechSettings.Builder setSampleRateHertz(int value)
       Optional. The synthesis sample rate (in hertz) for this audio. If not
       provided, then the synthesizer will use the default sample rate based on
       the audio encoding. If this is different from the voice's natural sample
       rate, then the synthesizer will honor this request by converting to the
       desired sample rate (which might result in worse audio quality).
       
      int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The sampleRateHertz to set.
      Returns:
      This builder for chaining.
    • clearSampleRateHertz

      public TextToSpeechSettings.Builder clearSampleRateHertz()
       Optional. The synthesis sample rate (in hertz) for this audio. If not
       provided, then the synthesizer will use the default sample rate based on
       the audio encoding. If this is different from the voice's natural sample
       rate, then the synthesizer will honor this request by converting to the
       desired sample rate (which might result in worse audio quality).
       
      int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getSynthesizeSpeechConfigsCount

      public int getSynthesizeSpeechConfigsCount()
      Description copied from interface: TextToSpeechSettingsOrBuilder
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSynthesizeSpeechConfigsCount in interface TextToSpeechSettingsOrBuilder
    • containsSynthesizeSpeechConfigs

      public boolean containsSynthesizeSpeechConfigs(String key)
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsSynthesizeSpeechConfigs in interface TextToSpeechSettingsOrBuilder
    • getSynthesizeSpeechConfigs

      @Deprecated public Map<String,SynthesizeSpeechConfig> getSynthesizeSpeechConfigs()
      Deprecated.
      Specified by:
      getSynthesizeSpeechConfigs in interface TextToSpeechSettingsOrBuilder
    • getSynthesizeSpeechConfigsMap

      public Map<String,SynthesizeSpeechConfig> getSynthesizeSpeechConfigsMap()
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSynthesizeSpeechConfigsMap in interface TextToSpeechSettingsOrBuilder
    • getSynthesizeSpeechConfigsOrDefault

      public SynthesizeSpeechConfig getSynthesizeSpeechConfigsOrDefault(String key, SynthesizeSpeechConfig defaultValue)
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSynthesizeSpeechConfigsOrDefault in interface TextToSpeechSettingsOrBuilder
    • getSynthesizeSpeechConfigsOrThrow

      public SynthesizeSpeechConfig getSynthesizeSpeechConfigsOrThrow(String key)
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSynthesizeSpeechConfigsOrThrow in interface TextToSpeechSettingsOrBuilder
    • clearSynthesizeSpeechConfigs

      public TextToSpeechSettings.Builder clearSynthesizeSpeechConfigs()
    • removeSynthesizeSpeechConfigs

      public TextToSpeechSettings.Builder removeSynthesizeSpeechConfigs(String key)
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getMutableSynthesizeSpeechConfigs

      @Deprecated public Map<String,SynthesizeSpeechConfig> getMutableSynthesizeSpeechConfigs()
      Deprecated.
      Use alternate mutation accessors instead.
    • putSynthesizeSpeechConfigs

      public TextToSpeechSettings.Builder putSynthesizeSpeechConfigs(String key, SynthesizeSpeechConfig value)
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
    • putAllSynthesizeSpeechConfigs

      public TextToSpeechSettings.Builder putAllSynthesizeSpeechConfigs(Map<String,SynthesizeSpeechConfig> values)
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
    • putSynthesizeSpeechConfigsBuilderIfAbsent

      public SynthesizeSpeechConfig.Builder putSynthesizeSpeechConfigsBuilderIfAbsent(String key)
       Optional. Configuration of how speech should be synthesized, mapping from
       language (https://cloud.google.com/dialogflow/docs/reference/language) to
       SynthesizeSpeechConfig.
       
      map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];