openl3 features

This commit is contained in:
em474re 2021-09-07 14:43:32 +02:00
parent 21cf2b224c
commit 4b834fab47

View File

@ -0,0 +1,13 @@
import os
import sys
import openl3
# data path (dist/wav/)
path = sys.argv[1]
# train, devel or test subset
dataset = sys.argv[2]
# extract features for all audio samples from correct subset
files = sorted([f for f in os.listdir(path) if dataset in f])
openl3.process_audio_file([path + f for f in files], output_dir='./features/openl3/'+dataset+'/', batch_size=32, embedding_size=512)