@Override
  public void extractFeatures(List regions) throws FeatureExtractorException {

    try {
      // Identify all regions which are associated with each wav data.
      HashMap<WavData, List<Region>> wave_region_map = new HashMap<WavData, List<Region>>();
      for (Region r : (List<Region>) regions) {
        WavData wav = (WavData) r.getAttribute("wav");
        if (wav != null) {
          if (!wave_region_map.containsKey(wav)) {
            wave_region_map.put(wav, new ArrayList<Region>());
          }
          wave_region_map.get(wav).add(r);
        }
      }

      for (WavData wav : wave_region_map.keySet()) {
        PitchExtractor extractor = new PitchExtractor(wav);
        Contour pitch_contour = extractor.soundToPitch();
        ContourUtils.assignValuesToRegions(wave_region_map.get(wav), pitch_contour, feature_name);
      }
    } catch (AuToBIException e) {
      throw new FeatureExtractorException(e.getMessage());
    }
  }