def sel_speaker(speakers, gender='both', accents_excluded=[]):
  """select a subset of speakers based on gender and accents
     gender: 'M', 'F', or 'both'
     accents_excluded: list of excluded accents, e.g. ['Indian', 'Unknown']
  """
  if gender != 'both':
    speakers_selected = [spk for spk in speakers if spk['gender'] == gender]
  else:
    speakers_selected = speakers[:]

  for accent in accents_excluded:
    speakers_selected = [spk for spk in speakers_selected if spk['accents']!=accent]

  return speakers_selected