def _list_audio_files(self, root, skip_rows=0):
        """Populates synsets - a map of index to label for the data items.
        Populates the data in the dataset, making tuples of (data, label)
        """
        self.synsets = []
        self.items = []
        if not self._train_csv:
            # The audio files are organized in folder structure with
            # directory name as label and audios in them
            self._folder_structure(root)
        else:
            # train_csv contains mapping between filename and label
            self._csv_labelled_dataset(root, skip_rows=skip_rows)

        # Generating the synset.txt file now
        if not os.path.exists("./synset.txt"):
            with open("./synset.txt", "w") as synsets_file:
                for item in self.synsets:
                    synsets_file.write(item+os.linesep)
            print("Synsets is generated as synset.txt")
        else:
            warnings.warn("Synset file already exists in the current directory! Not generating synset.txt.")