Class StreamingTranslateSpeechConfig.Builder

    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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

        public StreamingTranslateSpeechConfig 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
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<StreamingTranslateSpeechConfig.Builder>
      • 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.
      • setAudioConfig

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

        public StreamingTranslateSpeechConfig.Builder mergeAudioConfig​(TranslateSpeechConfig value)
         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];
      • 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.