code: def task1_metric(clean_speech, denoised_speech, sr=16000):
      """
      Compute evaluation metric for task 1 as (stoi+(1-word error rate)/2)
      This function computes such measure for 1 single datapoint
      """
      WER = wer(clean_speech, denoised_speech)
      if WER is not None:  # if there is no speech in the segment
          STOI = stoi(clean_speech, denoised_speech, sr, extended=False)
          WER = np.clip(WER, 0.0, 1.0)
          STOI = np.clip(STOI, 0.0, 1.0)
          metric = (STOI + (1.0 - WER)) / 2.0
      else:
          metric = None
          STOI = None
      return metric, WER, STOI
  
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 2 for calling a global function with example usage: task1_metric(clean_speech, denoised_speech, sr) and returns: metric,  WER,  STOI