code: def wer(clean_speech, denoised_speech):
      """
      computes the word error rate(WER) score for 1 single data point
      """
  
      def _transcription(clean_speech, denoised_speech):
          # transcribe clean audio
          input_values = wer_tokenizer(
              clean_speech, return_tensors="pt"
          ).input_values
          logits = wer_model(input_values).logits
          predicted_ids = torch.argmax(logits, dim=-1)
          transcript_clean = wer_tokenizer.batch_decode(predicted_ids)[
              0
          ]
  
          # transcribe
          input_values = wer_tokenizer(
              denoised_speech, return_tensors="pt"
          ).input_values
          logits = wer_model(input_values).logits
          predicted_ids = torch.argmax(logits, dim=-1)
          transcript_estimate = wer_tokenizer.batch_decode(
              predicted_ids
          )[0]
  
          return [transcript_clean, transcript_estimate]
  
      transcript = _transcription(clean_speech, denoised_speech)
      try:  # if no words are predicted
          wer_val = jiwer.wer(transcript[0], transcript[1])
      except ValueError:
          wer_val = None
  
      return wer_val
  
file_path: espnet/egs2/l3das22/enh1/local/metric.py
imports: import argparse
  import os
  import sys
  import warnings
  import jiwer
  import numpy
  import soundfile
  import torch
  import torchaudio
  import transformers
  from pystoi import stoi
  from tqdm import tqdm
  from transformers import Wav2Vec2ForMaskedLM, Wav2Vec2Tokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: wer(clean_speech, denoised_speech) and returns: wer_val, list