Class OutputAudioConfig.Builder (4.5.11) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 4.5.11keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  OutputAudioConfig . Builder   extends   GeneratedMessageV3 . Builder<OutputAudioConfig . Builder >  implements   OutputAudioConfigOrBuilder  
   Instructs the speech synthesizer how to generate the output audio content.
 If this audio config is supplied in a request, it overrides all existing
 text-to-speech settings applied to the agent.
 Protobuf type google.cloud.dialogflow.v2beta1.OutputAudioConfig
Static Methods
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  Returns 
  
  Methods
   
  addRepeatedField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   OutputAudioConfig . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  build() 
  
    
public   OutputAudioConfig   build ()  
  Returns 
  
  buildPartial() 
  
    
public   OutputAudioConfig   buildPartial ()  
  Returns 
  
  clear() 
  
    
public   OutputAudioConfig . Builder   clear ()  
  Returns 
  
  Overrides 
  
  clearAudioEncoding() 
  
    
public   OutputAudioConfig . Builder   clearAudioEncoding ()  
   Required. Audio encoding of the synthesized audio content.
 
 .google.cloud.dialogflow.v2beta1.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
  clearField(Descriptors.FieldDescriptor field) 
  
    
public   OutputAudioConfig . Builder   clearField ( Descriptors . FieldDescriptor   field )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  clearOneof(Descriptors.OneofDescriptor oneof) 
  
    
public   OutputAudioConfig . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  clearSampleRateHertz() 
  
    
public   OutputAudioConfig . Builder   clearSampleRateHertz ()  
   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 = 2;
Returns 
  
  clearSynthesizeSpeechConfig() 
  
    
public   OutputAudioConfig . Builder   clearSynthesizeSpeechConfig ()  
   Configuration of how speech should be synthesized.
 .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig synthesize_speech_config = 3;
 
Returns 
  
  clone() 
  
    
public   OutputAudioConfig . Builder   clone ()  
  Returns 
  
  Overrides 
  
  getAudioEncoding() 
  
    
public   OutputAudioEncoding   getAudioEncoding ()  
   Required. Audio encoding of the synthesized audio content.
 
 .google.cloud.dialogflow.v2beta1.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
  getAudioEncodingValue() 
  
    
public   int   getAudioEncodingValue ()  
   Required. Audio encoding of the synthesized audio content.
 
 .google.cloud.dialogflow.v2beta1.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
    
      
        Type Description  
      
        int The enum numeric value on the wire for audioEncoding.
 
     
  
  getDefaultInstanceForType() 
  
    
public   OutputAudioConfig   getDefaultInstanceForType ()  
  Returns 
  
  getDescriptorForType() 
  
    
public   Descriptors . Descriptor   getDescriptorForType ()  
  Returns 
  
  Overrides 
  
  getSampleRateHertz() 
  
    
public   int   getSampleRateHertz ()  
   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 = 2;
Returns 
  
    
      
        Type Description  
      
        int The sampleRateHertz.
 
     
  
  getSynthesizeSpeechConfig() 
  
    
public   SynthesizeSpeechConfig   getSynthesizeSpeechConfig ()  
   Configuration of how speech should be synthesized.
 .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig synthesize_speech_config = 3;
 
Returns 
  
  getSynthesizeSpeechConfigBuilder() 
  
    
public   SynthesizeSpeechConfig . Builder   getSynthesizeSpeechConfigBuilder ()  
   Configuration of how speech should be synthesized.
 .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig synthesize_speech_config = 3;
 
Returns 
  
  getSynthesizeSpeechConfigOrBuilder() 
  
    
public   SynthesizeSpeechConfigOrBuilder   getSynthesizeSpeechConfigOrBuilder ()  
   Configuration of how speech should be synthesized.
 .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig synthesize_speech_config = 3;
 
Returns 
  
  hasSynthesizeSpeechConfig() 
  
    
public   boolean   hasSynthesizeSpeechConfig ()  
   Configuration of how speech should be synthesized.
 .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig synthesize_speech_config = 3;
 
Returns 
  
    
      
        Type Description  
      
        boolean Whether the synthesizeSpeechConfig field is set.
 
     
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  Returns 
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  Returns 
  
  Overrides 
  
  mergeFrom(OutputAudioConfig other) 
  
    
public   OutputAudioConfig . Builder   mergeFrom ( OutputAudioConfig   other )  
  Parameter 
  
  Returns 
  
  
    
public   OutputAudioConfig . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  Exceptions 
  
  mergeFrom(Message other) 
  
    
public   OutputAudioConfig . Builder   mergeFrom ( Message   other )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  mergeSynthesizeSpeechConfig(SynthesizeSpeechConfig value) 
  
    
public   OutputAudioConfig . Builder   mergeSynthesizeSpeechConfig ( SynthesizeSpeechConfig   value )  
   Configuration of how speech should be synthesized.
 .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig synthesize_speech_config = 3;
 
Parameter 
  
  Returns 
  
  mergeUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   OutputAudioConfig . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  setAudioEncoding(OutputAudioEncoding value) 
  
    
public   OutputAudioConfig . Builder   setAudioEncoding ( OutputAudioEncoding   value )  
   Required. Audio encoding of the synthesized audio content.
 
 .google.cloud.dialogflow.v2beta1.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
  Returns 
  
  setAudioEncodingValue(int value) 
  
    
public   OutputAudioConfig . Builder   setAudioEncodingValue ( int   value )  
   Required. Audio encoding of the synthesized audio content.
 
 .google.cloud.dialogflow.v2beta1.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
    
      
        Name Description  
      
        value int The enum numeric value on the wire for audioEncoding to set.
 
     
  
  Returns 
  
  setField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   OutputAudioConfig . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) 
  
    
public   OutputAudioConfig . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  setSampleRateHertz(int value) 
  
    
public   OutputAudioConfig . Builder   setSampleRateHertz ( int   value )  
   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 = 2;
Parameter 
  
    
      
        Name Description  
      
        value int The sampleRateHertz to set.
 
     
  
  Returns 
  
  setSynthesizeSpeechConfig(SynthesizeSpeechConfig value) 
  
    
public   OutputAudioConfig . Builder   setSynthesizeSpeechConfig ( SynthesizeSpeechConfig   value )  
   Configuration of how speech should be synthesized.
 .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig synthesize_speech_config = 3;
 
Parameter 
  
  Returns 
  
  setSynthesizeSpeechConfig(SynthesizeSpeechConfig.Builder builderForValue) 
  
    
public   OutputAudioConfig . Builder   setSynthesizeSpeechConfig ( SynthesizeSpeechConfig . Builder   builderForValue )  
   Configuration of how speech should be synthesized.
 .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig synthesize_speech_config = 3;
 
Parameter 
  
  Returns 
  
  setUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   OutputAudioConfig . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
  Parameter 
  
  Returns 
  
  Overrides 
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-29 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]