class_docstr: This class implements the task-specific Lingvo ASR model of Qin et al. (2019).
  
  The estimator uses a pre-trained model provided by Qin et al., which is trained using the Lingvo library and the
  LibriSpeech dataset.
  
  | Paper link: http://proceedings.mlr.press/v97/qin19a.html, https://arxiv.org/abs/1902.08295
  
  .. warning:: In order to calculate loss gradients, this estimator requires a user-patched Lingvo module. A patched
               source file for the `lingvo.tasks.asr.decoder` module will be automatically applied. The original
               source file can be found in `<PYTHON_SITE_PACKAGES>/lingvo/tasks/asr/decoder.py` and will be patched as
               outlined in the following commit diff:
               https://github.com/yaq007/lingvo/commit/414e035b2c60372de732c9d67db14d1003be6dd6
  
  The patched `decoder_patched.py` can be found in `ART_DATA_PATH/lingvo/asr`.
  
  Note: Run `python -m site` to obtain a list of possible candidates where to find the `<PYTHON_SITE_PACKAGES` folder.
docstr: Extract Log-Mel features from audio samples of shape (batch_size, max_length).
docstr_tok: ["Extract","Log-Mel","features","from","audio","samples","of","shape","(","batch_size",",","max_length",")","."]
code: def _create_log_mel_features(x: "Tensor") -> "Tensor":
      """Extract Log-Mel features from audio samples of shape (batch_size, max_length)."""
      from lingvo.core.py_utils import NestedMap
      import tensorflow.compat.v1 as tf1
  
      def _create_asr_frontend():
          """Parameters corresponding to default ASR frontend."""
          from lingvo.tasks.asr import frontend
  
          params = frontend.MelAsrFrontend.Params()
          # default params from Lingvo
          params.sample_rate = 16000.0
          params.frame_size_ms = 25.0
          params.frame_step_ms = 10.0
          params.num_bins = 80
          params.lower_edge_hertz = 125.0
          params.upper_edge_hertz = 7600.0
          params.preemph = 0.97
          params.noise_scale = 0.0
          params.pad_end = False
          # additional params from Qin et al.
          params.stack_left_context = 2
          params.frame_stride = 3
          return params.Instantiate()
  
      # init Lingvo ASR frontend
      mel_frontend = _create_asr_frontend()
  
      # extract log-mel features
      log_mel = mel_frontend.FPropDefaultTheta(
          NestedMap(src_inputs=x, paddings=tf1.zeros_like(x))
      )
      features = log_mel.src_inputs
  
      # reshape features to shape (batch_size, n_frames, n_features, channels) in compliance with Qin et al.
      features_shape = (tf1.shape(x)[0], -1, 80, features.shape[-1])
      features = tf1.reshape(features, features_shape)
      return features
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import os
  import sys
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
  import numpy
  from art import config
  from art.estimators.speech_recognition.speech_recognizer import SpeechRecognizerMixin
  from art.estimators.tensorflow import TensorFlowV2Estimator
  from art.utils import get_file, make_directory
label_desc: Use image node_id 7 for calling the TensorFlowLingvoASR obj's underlying member method code with example usage: obj._create_log_mel_features(x) and returns: features, params