code: def get_wav_list(data_dir, reco2channels=None):
      """
      Return a dictionary of uttid with wav paths. Optionally takes reco2channels and,
      if provided, the uttid is actually the recoid.
      """
      if reco2channels is not None:
          keep_wavs = {
              reco2channels[reco][0]: reco
              for reco in reco2channels.keys()
          }
      wav_list = {}
      with open(os.path.join(data_dir, "wav.scp"), "r") as f:
          for line in f.readlines():
              utt, wav = line.strip().split()
              if reco2channels is not None:
                  if utt in keep_wavs:
                      wav_list[keep_wavs[utt]] = wav
              else:
                  wav_list[utt] = wav
      return wav_list
  
file_path: espnet/egs/libri_css/asr1/local/segmentation/apply_webrtcvad.py
imports: import argparse
  import collections
  import contextlib
  import os
  import sys
  import wave
  import webrtcvad
label_desc: Use image node_id 7 for calling a global function with example usage: get_wav_list(data_dir, reco2channels) and returns: wav_list