docs: def trim_wavs(org_wav_dir=ORG_WAV_DIR,
                tgt_wav_dir=TGT_WAV_DIR,
                org_xml_dir=ORG_XML_DIR):
      """ Extracts sentence-level transcriptions, translations and wavs from the
      Na Pangloss XML and WAV files. But otherwise doesn't preprocess them."""
  
      logging.info("Trimming wavs...")
  
      if not os.path.exists(os.path.join(tgt_wav_dir, "TEXT")):
          os.makedirs(os.path.join(tgt_wav_dir, "TEXT"))
      if not os.path.exists(os.path.join(tgt_wav_dir, "WORDLIST")):
          os.makedirs(os.path.join(tgt_wav_dir, "WORDLIST"))
  
      for fn in os.listdir(org_xml_dir):
          path = os.path.join(org_xml_dir, fn)
          prefix, _ = os.path.splitext(fn)
  
          if os.path.isdir(path):
              continue
          if not path.endswith(".xml"):
              continue
  
          logging.info("Trimming wavs from {}".format(fn))
  
          rec_type, _, times, _ = pangloss.get_sents_times_and_translations(path)
  
          # Extract the wavs given the times.
          for i, (start_time, end_time) in enumerate(times):
              if prefix.endswith("PLUSEGG"):
                  in_wav_path = os.path.join(org_wav_dir, prefix.upper()[:-len("PLUSEGG")]) + ".wav"
              else:
                  in_wav_path = os.path.join(org_wav_dir, prefix.upper()) + ".wav"
              headmic_path = os.path.join(org_wav_dir, prefix.upper()) + "_HEADMIC.wav"
              if os.path.isfile(headmic_path):
                  in_wav_path = headmic_path
  
              out_wav_path = os.path.join(tgt_wav_dir, rec_type, "%s.%d.wav" % (prefix, i))
              if not os.path.isfile(in_wav_path):
                  raise PersephoneException("{} not a file.".format(in_wav_path))
              start_time = start_time * ureg.seconds
              end_time = end_time * ureg.seconds
              wav.trim_wav_ms(Path(in_wav_path), Path(out_wav_path),
                              start_time.to(ureg.milliseconds).magnitude,
                              end_time.to(ureg.milliseconds).magnitude)