/** * * * <pre> * *Required* Provides information to the recognizer that specifies how to * process the request. * </pre> * * <code>.google.cloud.speech.v1.RecognitionConfig config = 1;</code> */ public Builder setConfig(com.google.cloud.speech.v1.RecognitionConfig value) { if (configBuilder_ == null) { if (value == null) { throw new NullPointerException(); } config_ = value; onChanged(); } else { configBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * *Required* Provides information to the recognizer that specifies how to * process the request. * </pre> * * <code>.google.cloud.speech.v1.RecognitionConfig config = 1;</code> */ public com.google.cloud.speech.v1.RecognitionConfig.Builder getConfigBuilder() { onChanged(); return getConfigFieldBuilder().getBuilder(); } /**
/** * * * <pre> * *Required* Provides information to the recognizer that specifies how to * process the request. * </pre> * * <code>.google.cloud.speech.v1.RecognitionConfig config = 1;</code> */ public Builder setConfig(com.google.cloud.speech.v1.RecognitionConfig.Builder builderForValue) { if (configBuilder_ == null) { config_ = builderForValue.build(); onChanged(); } else { configBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * *Required* Provides information to the recognizer that specifies how to * process the request. * </pre> * * <code>.google.cloud.speech.v1.RecognitionConfig config = 1;</code> */ public Builder mergeConfig(com.google.cloud.speech.v1.RecognitionConfig value) { if (configBuilder_ == null) { if (config_ != null) { config_ = com.google.cloud.speech.v1.RecognitionConfig.newBuilder(config_) .mergeFrom(value) .buildPartial(); } else { config_ = value; } onChanged(); } else { configBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * *Optional* If `false` or omitted, the recognizer will perform continuous * recognition (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 * `StreamingRecognitionResult`s with the `is_final` flag set to `true`. * If `true`, the recognizer 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 recognition. It will return no * more than one `StreamingRecognitionResult` with the `is_final` flag set to * `true`. * </pre> * * <code>bool single_utterance = 2;</code> */ public Builder setSingleUtterance(boolean value) { singleUtterance_ = value; onChanged(); return this; } /**
/** * * * <pre> * *Optional* If `false` or omitted, the recognizer will perform continuous * recognition (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 * `StreamingRecognitionResult`s with the `is_final` flag set to `true`. * If `true`, the recognizer 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 recognition. It will return no * more than one `StreamingRecognitionResult` with the `is_final` flag set to * `true`. * </pre> * * <code>bool single_utterance = 2;</code> */ public Builder clearSingleUtterance() { singleUtterance_ = false; onChanged(); return this; }
/** * * * <pre> * *Optional* If `true`, interim results (tentative hypotheses) may be * returned as they become available (these interim results are indicated with * the `is_final=false` flag). * If `false` or omitted, only `is_final=true` result(s) are returned. * </pre> * * <code>bool interim_results = 3;</code> */ public Builder setInterimResults(boolean value) { interimResults_ = value; onChanged(); return this; } /**
/** * * * <pre> * *Required* Provides information to the recognizer that specifies how to * process the request. * </pre> * * <code>.google.cloud.speech.v1.RecognitionConfig config = 1;</code> */ public Builder clearConfig() { if (configBuilder_ == null) { config_ = null; onChanged(); } else { config_ = null; configBuilder_ = null; } return this; } /**
/** * * * <pre> * *Optional* If `true`, interim results (tentative hypotheses) may be * returned as they become available (these interim results are indicated with * the `is_final=false` flag). * If `false` or omitted, only `is_final=true` result(s) are returned. * </pre> * * <code>bool interim_results = 3;</code> */ public Builder clearInterimResults() { interimResults_ = false; onChanged(); return this; }
public Builder mergeFrom(com.google.cloud.speech.v1.StreamingRecognitionConfig other) { if (other == com.google.cloud.speech.v1.StreamingRecognitionConfig.getDefaultInstance()) return this; if (other.hasConfig()) { mergeConfig(other.getConfig()); } if (other.getSingleUtterance() != false) { setSingleUtterance(other.getSingleUtterance()); } if (other.getInterimResults() != false) { setInterimResults(other.getInterimResults()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }