Example #1
0
def extract(idx):
    file_name = essentia_files[idx]
    audio_name = os.path.splitext(file_name)[0]
    full_path = os.path.join(essentia_analysis, file_name)
    temp_yaml = read_yaml(full_path)
    del temp_yaml['metadata']
    master_dict[audio_name] = temp_yaml
def extract(file_name):
    features = read_yaml(os.path.join(parent, essentia_analysis, file_name))
    temp = []
    for key in features:
        if key != 'metadata' and key != 'dynamicComplexity' and key != 'loudness':
            for stat in features[key]:
                if type(features[key][stat]) == list:
                    [temp.append(x) for x in features[key][stat]]
                else:
                    temp.append(features[key][stat])
        elif key == 'dynamicComplexity' or key == 'loudness':
            temp.append(features[key])
    raw_data.append(temp)
Example #3
0
def extract(idx):
    features = read_yaml(
        os.path.join(parent, essentia_analysis, file_list[idx]))
    audio_file_name = file_list[idx]
    audio_file_name = audio_file_name[:-5]
    temp = []
    for key in features:
        if key != 'metadata' and key != 'dynamicComplexity' and key != 'loudness':
            for stat in features[key]:
                if type(features[key][stat]) == list:
                    [temp.append(x) for x in features[key][stat]]
                else:
                    temp.append(features[key][stat])
        elif key == 'dynamicComplexity' or key == 'loudness':
            temp.append(features[key])

    raw_data[audio_file_name] = temp
 def extract(self, slash_filter, file_name):
     data = read_yaml(os.path.join(essentia_analysis, file_name))
     del data['metadata']
     self.master_dict[file_name[:-5]] = data