Class StreamingTranslateSpeechConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StreamingTranslateSpeechConfig.Builder>
com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig.Builder
All Implemented Interfaces:
StreamingTranslateSpeechConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
StreamingTranslateSpeechConfig

public static final class StreamingTranslateSpeechConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<StreamingTranslateSpeechConfig.Builder> implements StreamingTranslateSpeechConfigOrBuilder
 Config used for streaming translation.
 
Protobuf type google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig
  • 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<StreamingTranslateSpeechConfig.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<StreamingTranslateSpeechConfig.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<StreamingTranslateSpeechConfig.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

      public StreamingTranslateSpeechConfig.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<StreamingTranslateSpeechConfig.Builder>
      Throws:
      IOException
    • hasAudioConfig

      public boolean hasAudioConfig()
       Required. The common config for all the following audio contents.
       
      .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasAudioConfig in interface StreamingTranslateSpeechConfigOrBuilder
      Returns:
      Whether the audioConfig field is set.
    • getAudioConfig

      public TranslateSpeechConfig getAudioConfig()
       Required. The common config for all the following audio contents.
       
      .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAudioConfig in interface StreamingTranslateSpeechConfigOrBuilder
      Returns:
      The audioConfig.
    • setAudioConfig

       Required. The common config for all the following audio contents.
       
      .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];
    • setAudioConfig

       Required. The common config for all the following audio contents.
       
      .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];
    • mergeAudioConfig

       Required. The common config for all the following audio contents.
       
      .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];
    • clearAudioConfig

      public StreamingTranslateSpeechConfig.Builder clearAudioConfig()
       Required. The common config for all the following audio contents.
       
      .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];
    • getAudioConfigBuilder

      public TranslateSpeechConfig.Builder getAudioConfigBuilder()
       Required. The common config for all the following audio contents.
       
      .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];
    • getAudioConfigOrBuilder

      public TranslateSpeechConfigOrBuilder getAudioConfigOrBuilder()
       Required. The common config for all the following audio contents.
       
      .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAudioConfigOrBuilder in interface StreamingTranslateSpeechConfigOrBuilder
    • getSingleUtterance

      public boolean getSingleUtterance()
       Optional. If `false` or omitted, the system performs
       continuous translation (continuing to wait for and process audio even if
       the user pauses speaking) until the client closes the input stream (gRPC
       API) or until the maximum time limit has been reached. May return multiple
       `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`.
      
       If `true`, the speech translator will detect a single spoken utterance.
       When it detects that the user has paused or stopped speaking, it will
       return an `END_OF_SINGLE_UTTERANCE` event and cease translation.
       When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should
       stop sending the requests. However, clients should keep receiving remaining
       responses until the stream is terminated. To construct the complete
       sentence in a streaming way, one should override (if 'is_final' of previous
       response is false), or append (if 'is_final' of previous response is true).
       
      bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSingleUtterance in interface StreamingTranslateSpeechConfigOrBuilder
      Returns:
      The singleUtterance.
    • setSingleUtterance

      public StreamingTranslateSpeechConfig.Builder setSingleUtterance(boolean value)
       Optional. If `false` or omitted, the system performs
       continuous translation (continuing to wait for and process audio even if
       the user pauses speaking) until the client closes the input stream (gRPC
       API) or until the maximum time limit has been reached. May return multiple
       `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`.
      
       If `true`, the speech translator will detect a single spoken utterance.
       When it detects that the user has paused or stopped speaking, it will
       return an `END_OF_SINGLE_UTTERANCE` event and cease translation.
       When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should
       stop sending the requests. However, clients should keep receiving remaining
       responses until the stream is terminated. To construct the complete
       sentence in a streaming way, one should override (if 'is_final' of previous
       response is false), or append (if 'is_final' of previous response is true).
       
      bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The singleUtterance to set.
      Returns:
      This builder for chaining.
    • clearSingleUtterance

      public StreamingTranslateSpeechConfig.Builder clearSingleUtterance()
       Optional. If `false` or omitted, the system performs
       continuous translation (continuing to wait for and process audio even if
       the user pauses speaking) until the client closes the input stream (gRPC
       API) or until the maximum time limit has been reached. May return multiple
       `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`.
      
       If `true`, the speech translator will detect a single spoken utterance.
       When it detects that the user has paused or stopped speaking, it will
       return an `END_OF_SINGLE_UTTERANCE` event and cease translation.
       When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should
       stop sending the requests. However, clients should keep receiving remaining
       responses until the stream is terminated. To construct the complete
       sentence in a streaming way, one should override (if 'is_final' of previous
       response is false), or append (if 'is_final' of previous response is true).
       
      bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.