docstr: Write wav using audio_data[tensor].
  :param filename: filepath of wav.
  :param audio_data: a tensor containing data of a wav.
  :param sample_rate: [option]the samplerate of the signal we working with, default is 16kHz.
  :return: write wav opration.
docstr_tok: ["Write","wav","using","audio_data","[","tensor","]",".",":","param","filename",":","filepath","of","wav",".",":","param","audio_data",":","a","tensor","containing","data","of","a","wav",".",":","param","sample_rate",":","[","option","]","the","samplerate","of","the","signal","we","working","with",",","default","is","16kHz",".",":","return",":","write","wav","opration","."]
code: def call(self, filename, audio_data, sample_rate=None):
      """
      Write wav using audio_data[tensor].
      :param filename: filepath of wav.
      :param audio_data: a tensor containing data of a wav.
      :param sample_rate: [option]the samplerate of the signal we working with, default is 16kHz.
      :return: write wav opration.
      """
      p = self.config
      filename = tf.constant(filename)
  
      if sample_rate == None:
          sample_rate = tf.constant(p.sample_rate, dtype=tf.int32)
  
      assert_op = tf.assert_equal(
          tf.constant(p.sample_rate),
          tf.cast(sample_rate, dtype=tf.int32),
      )
      with tf.control_dependencies([assert_op]):
          audio_data = tf.cast(audio_data / 32768, dtype=tf.float32)
          contents = tf.audio.encode_wav(
              tf.expand_dims(audio_data, 1),
              tf.cast(sample_rate, dtype=tf.int32),
          )
          w = tf.io.write_file(filename, contents)
  
      return w
  
file_path: delta/delta/data/frontend/write_wav.py
imports: import delta.compat
  from delta.utils.hparam import HParams
  from delta.data.frontend.base_frontend import BaseFrontend
label_desc: Use image node_id 3 for calling the WriteWav obj's underlying member method code with example usage: obj.call(filename, audio_data, sample_rate) and returns: w