public final RecognizeResponse recognize(
      String recognizer, RecognitionConfig config, FieldMask configMask, ByteString content) {
    RecognizeRequest request =
        RecognizeRequest.newBuilder()
            .setRecognizer(recognizer)
            .setConfig(config)
            .setConfigMask(configMask)
            .setContent(content)
            .build();
    return recognize(request);
  }
Performs synchronous Speech recognition: receive results after all audio has been sent and
processed.

<p>Sample code:

<pre>{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpeechClient speechClient = SpeechClient.create()) {
  String recognizer = RecognizerName.of("[PROJECT]", "[LOCATION]", "[RECOGNIZER]").toString();
  RecognitionConfig config = RecognitionConfig.newBuilder().build();
  FieldMask configMask = FieldMask.newBuilder().build();
  ByteString content = ByteString.EMPTY;
  RecognizeResponse response = speechClient.recognize(recognizer, config, configMask, content);
}
}</pre>

@param recognizer Required. The name of the Recognizer to use during recognition. The expected
    format is `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
    {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
@param config Features and audio metadata to use for the Automatic Speech Recognition. This
    field in combination with the
    [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to
    override parts of the
    [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
    of the Recognizer resource.
@param configMask The list of fields in
    [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the
    [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
    of the recognizer during this recognition request. If no mask is provided, all non-default
    valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the
    values in the recognizer for this recognition request. If a mask is provided, only the
    fields listed in the mask override the config in the recognizer for this recognition
    request. If a wildcard (`&#42;`) is provided,
    [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces
    the config in the recognizer for this recognition request.
@param content The audio data bytes encoded as specified in
    [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields,
    proto buffers use a pure binary representation, whereas JSON representations use base64.
@throws com.google.api.gax.rpc.ApiException if the remote call fails
java-speech/google-cloud-speech/src/main/java/com/google/cloud/speech/v2/SpeechClient.java