openl3 features
This commit is contained in:
parent
21cf2b224c
commit
4b834fab47
13
src/extract_openl3_features.py
Normal file
13
src/extract_openl3_features.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user