async function syncRecognizeWithMetaData() {
    /**
     * TODO(developer): Uncomment the following lines before running the sample.
     */
    // const filename = 'Local path to audio file, e.g. /path/to/audio.raw';
    // const encoding = 'Encoding of the audio file, e.g. LINEAR16';
    // const sampleRateHertz = 16000;
    // const languageCode = 'BCP-47 language code, e.g. en-US';

    const recognitionMetadata = {
      interactionType: 'DISCUSSION',
      microphoneDistance: 'NEARFIELD',
      recordingDeviceType: 'SMARTPHONE',
      recordingDeviceName: 'Pixel 2 XL',
      industryNaicsCodeOfAudio: 519190,
    };

    const config = {
      encoding: encoding,
      sampleRateHertz: sampleRateHertz,
      languageCode: languageCode,
      metadata: recognitionMetadata,
    };

    const audio = {
      content: fs.readFileSync(filename).toString('base64'),
    };

    const request = {
      config: config,
      audio: audio,
    };

    // Detects speech in the audio file
    const [response] = await client.recognize(request);
    response.results.forEach(result => {
      const alternative = result.alternatives[0];
      console.log(alternative.transcript);
    });
    // [END speech_transcribe_recognition_metadata_beta]
  }
TODO(developer): Update client library import to use new
version of API when desired features become available