code: def get_spk2utt(paths, audio_format="flac"):
      spk2utt = defaultdict(list)
      for path in paths:
          for audio in Path(path).rglob("*.{}".format(audio_format)):
              readerID = audio.parent.parent.stem
              uid = audio.stem
              assert uid.split("-")[0] == readerID, audio
              spk2utt[readerID].append((uid, str(audio)))
  
      return spk2utt
  
imports: import json
  from collections import defaultdict
  from itertools import chain
  from pathlib import Path
  from espnet2.utils.types import str2bool
label_desc: Use image node_id 1 for calling a global function with example usage: get_spk2utt(paths, audio_format) and returns: spk2utt