Class 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.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
    implements TextToSpeechSettingsOrBuilder
     Instructs the speech synthesizer on how to generate the output audio content.
     
    Protobuf type google.cloud.dialogflow.v2beta1.TextToSpeechSettings
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • internalGetFieldAccessorTable

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

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public TextToSpeechSettings.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • setField

        public TextToSpeechSettings.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • clearField

        public TextToSpeechSettings.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • clearOneof

        public TextToSpeechSettings.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • setRepeatedField

        public TextToSpeechSettings.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             int index,
                                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • addRepeatedField

        public TextToSpeechSettings.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsSynthesizeSpeechConfigs 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.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getSynthesizeSpeechConfigsMap 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.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getSynthesizeSpeechConfigsOrThrow in interface TextToSpeechSettingsOrBuilder
      • 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.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
      • 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.v2beta1.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.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
      • setUnknownFields

        public final TextToSpeechSettings.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>
      • mergeUnknownFields

        public final TextToSpeechSettings.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextToSpeechSettings.Builder>