from defs import paths as pt
from defs import features as ft
from defs import stats
import os

# nacte parametry a spocitace statisticke funkce
print('*start*')
if not os.path.exists('data/_stat'):
    os.makedirs('data/_stat')
path = 'data/'
names = pt.listdir('data/_wavs')
for name in names:
    print('*zpracovani ' + name + '*')
    fts = ft.FeatsData()
    fts.load_feats(path+pt.feat(name))
    fts_sts = stats.FeatsStats()
    fts_sts.get(fts)
    fts_sts.save(path+pt.stat(name))
    print('*statistika ulozena*')
print('*hotovo*')
