def load_file(folder_path, idx, corpus):
        """
        Load speaker, file, utterance, labels for the file with the given id.
        """
        xml_path = os.path.join(folder_path, '{}.xml'.format(idx))
        wav_paths = glob.glob(os.path.join(folder_path, '{}_*.wav'.format(idx)))

        if len(wav_paths) == 0:
            return []

        xml_file = open(xml_path, 'r', encoding='utf-8')
        soup = BeautifulSoup(xml_file, 'lxml')

        transcription = soup.recording.cleaned_sentence.string
        transcription_raw = soup.recording.sentence.string
        gender = soup.recording.gender.string
        is_native = soup.recording.muttersprachler.string
        age_class = soup.recording.ageclass.string
        speaker_idx = soup.recording.speaker_id.string

        if speaker_idx not in corpus.issuers.keys():
            start_age_class = int(age_class.split('-')[0])

            if start_age_class < 12:
                age_group = issuers.AgeGroup.CHILD
            elif start_age_class < 18:
                age_group = issuers.AgeGroup.YOUTH
            elif start_age_class < 65:
                age_group = issuers.AgeGroup.ADULT
            else:
                age_group = issuers.AgeGroup.SENIOR

            native_lang = None

            if is_native == 'Ja':
                native_lang = 'deu'

            issuer = issuers.Speaker(speaker_idx,
                                     gender=issuers.Gender(gender),
                                     age_group=age_group,
                                     native_language=native_lang)
            corpus.import_issuers(issuer)

        utt_ids = []

        for wav_path in wav_paths:
            wav_name = os.path.split(wav_path)[1]
            wav_idx = os.path.splitext(wav_name)[0]
            corpus.new_file(wav_path, wav_idx)
            utt = corpus.new_utterance(wav_idx, wav_idx, speaker_idx)
            utt.set_label_list(annotations.LabelList.create_single(
                transcription,
                idx=audiomate.corpus.LL_WORD_TRANSCRIPT
            ))
            utt.set_label_list(annotations.LabelList.create_single(
                transcription_raw,
                idx=audiomate.corpus.LL_WORD_TRANSCRIPT_RAW
            ))
            utt_ids.append(wav_idx)

        return utt_ids
Load speaker, file, utterance, labels for the file with the given id.