-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3f4f66
commit 6ac4a43
Showing
58 changed files
with
461 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
learning_rate: 1e-5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
steps: 512 | ||
learning_rate: 1e-5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREMA-D/ | ||
EMO-DB/ | ||
RAVDESS/ | ||
results/ | ||
logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: CREMA-D | ||
data: | ||
datasets: | ||
CREMA-D: | ||
path: CREMA-D/corpus.yaml | ||
features: wav2vec_c_mean | ||
model: | ||
type: sk/lr | ||
config: ${cwdpath:../conf/clf/sk/lr/default.yaml} | ||
training: | ||
normalise: online | ||
transform: std | ||
seq_transform: feature | ||
tensorflow: | ||
batch_size: 32 | ||
epochs: 50 | ||
logging: | ||
log_dir: logs/tf | ||
data_fn: null | ||
pytorch: | ||
batch_size: 32 | ||
epochs: 50 | ||
logging: | ||
log_dir: logs/pt | ||
eval: | ||
cv: | ||
part: speaker | ||
kfold: 10 | ||
inner_kfold: 2 | ||
inner_part: speaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: EMO-DB | ||
data: | ||
datasets: | ||
EMO-DB: | ||
path: EMO-DB/corpus.yaml | ||
features: wav2vec_c_mean | ||
model: | ||
type: sk/lr | ||
config: ${cwdpath:../conf/clf/sk/lr/default.yaml} | ||
training: | ||
normalise: online | ||
transform: std | ||
seq_transform: feature | ||
tensorflow: | ||
batch_size: 32 | ||
epochs: 50 | ||
logging: | ||
log_dir: logs/tf | ||
data_fn: null | ||
pytorch: | ||
batch_size: 32 | ||
epochs: 50 | ||
logging: | ||
log_dir: logs/pt | ||
eval: | ||
cv: | ||
part: speaker | ||
kfold: -1 | ||
inner_kfold: 2 | ||
inner_part: speaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: RAVDESS | ||
data: | ||
datasets: | ||
RAVDESS: | ||
path: RAVDESS/corpus.yaml | ||
subset: speech | ||
features: wav2vec_c_mean | ||
model: | ||
type: sk/lr | ||
config: ${cwdpath:conf/clf/sk/lr/default.yaml} | ||
training: | ||
normalise: online | ||
transform: std | ||
seq_transform: feature | ||
tensorflow: | ||
batch_size: 32 | ||
epochs: 50 | ||
logging: | ||
log_dir: logs/tf | ||
data_fn: null | ||
pytorch: | ||
batch_size: 32 | ||
epochs: 50 | ||
logging: | ||
log_dir: logs/pt | ||
eval: | ||
cv: | ||
part: speaker | ||
kfold: 8 | ||
inner_kfold: 2 | ||
inner_part: speaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Examples | ||
|
||
This is a basic within-corpus and cross-corpus experimental setup. | ||
|
||
## Datasets | ||
Run `ertk-dataset setup` for each of CREMA-D, RAVDESS, EMO-DB: | ||
``` | ||
ertk-dataset setup CREMA-D /path/to/CREMA-D ./CREMA-D | ||
``` | ||
|
||
## Features | ||
Run the `extract_features.sh` script to extract eGeMAPS, Wav2vec, and | ||
log mel spectrogram features. | ||
|
||
## Experiments | ||
Run the `run_exps.sh` script to run experiments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
learning_rate: 1e-5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
data: | ||
datasets: | ||
CREMA-D: | ||
path: CREMA-D/corpus.yaml | ||
EMO-DB: | ||
path: EMO-DB/corpus.yaml | ||
RAVDESS: | ||
path: RAVDESS/corpus.yaml | ||
subset: speech | ||
remove_groups: | ||
label: | ||
keep: | ||
- anger | ||
- disgust | ||
- fear | ||
- happiness | ||
- neutral | ||
- sadness | ||
features: # Will be set on command line | ||
model: # Will be set on command line | ||
type: _not_set_ | ||
config: {} | ||
training: | ||
normalise: online | ||
transform: std | ||
seq_transform: feature | ||
tensorflow: | ||
batch_size: 32 | ||
epochs: 50 | ||
logging: | ||
log_dir: logs/tf | ||
data_fn: null | ||
pytorch: | ||
batch_size: 32 | ||
epochs: 50 | ||
logging: | ||
log_dir: logs/pt | ||
eval: | ||
cv: | ||
part: corpus | ||
kfold: -1 | ||
inner_kfold: 2 | ||
results: "" # Will be set on command line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
for dataset in CREMA-D EMO-DB RAVDESS; do | ||
ertk-dataset process \ | ||
--processor opensmile \ | ||
--n_jobs -1 \ | ||
--sample_rate 16000 \ | ||
--corpus $dataset \ | ||
$dataset/files_all.txt \ | ||
$dataset/features/eGeMAPS.nc \ | ||
opensmile_config=eGeMAPS | ||
ertk-dataset process \ | ||
--processor fairseq \ | ||
--sample_rate 16000 \ | ||
--corpus $dataset \ | ||
$dataset/files_all.txt \ | ||
$dataset/features/wav2vec_c_mean.nc \ | ||
model_type=wav2vec \ | ||
checkpoint=/path/to/wav2vec_large.pt \ | ||
layer=context \ | ||
aggregate=MEAN | ||
ertk-dataset process \ | ||
--processor spectrogram \ | ||
--n_jobs -1 \ | ||
--sample_rate 16000 \ | ||
--corpus $dataset \ | ||
$dataset/files_all.txt \ | ||
$dataset/features/logmel-0.05-0.025-80.nc \ | ||
kind=mel \ | ||
window_size=0.05 \ | ||
window_shift=0.025 \ | ||
n_mels=80 \ | ||
to_log=log | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
export TF_CPP_MIN_LOG_LEVEL=1 | ||
|
||
# Within-corpus | ||
for dataset in CREMA-D EMO-DB RAVDESS; do | ||
ertk-cli exp2 ${dataset}.yaml data.features=eGeMAPS model.type=sk/lr model.param_grid=\${cwdpath:../conf/clf/sk/lr/grids/default.yaml} results=results_within/lr/eGeMAPS.csv | ||
ertk-cli exp2 ${dataset}.yaml data.features=wav2vec_c_mean model.type=sk/lr model.param_grid=\${cwdpath:../conf/clf/sk/lr/grids/default.yaml} results=results_within/lr/wav2vec.csv | ||
ertk-cli exp2 ${dataset}.yaml data.features=eGeMAPS model.type=sk/svm model.param_grid=\${cwdpath:../conf/clf/sk/svm/grids/rbf.yaml} results=results_within/svm/eGeMAPS.csv | ||
ertk-cli exp2 ${dataset}.yaml data.features=wav2vec_c_mean model.type=sk/svm model.param_grid=\${cwdpath:../conf/clf/sk/svm/grids/rbf.yaml} results=results_within/svm/wav2vec.csv | ||
|
||
ertk-cli exp2 exp_loco.yaml training.normalise=none data.features=logmel-0.05-0.025-80 data.pad_seq=100 data.clip_seq=512 model.type=tf/aldeneh2017 model.config=\${cwdpath:aldeneh2017.yaml} results=results_within/aldeneh2017/melspec.csv | ||
ertk-cli exp2 exp_loco.yaml training.normalise=none data.features=logmel-0.05-0.025-80 data.pad_seq=256 data.clip_seq=256 model.type=tf/zhao2019 model.config=\${cwdpath:zhao2019.yaml} results=results_within/zhao2019/melspec.csv | ||
done | ||
|
||
# Cross-corpus | ||
|
||
# SVM and logistic regression experiments | ||
ertk-cli exp2 exp_loco.yaml data.features=eGeMAPS model.type=sk/lr model.param_grid=\${cwdpath:../conf/clf/sk/lr/grids/default.yaml} results=results_cross/lr/eGeMAPS.csv | ||
ertk-cli exp2 exp_loco.yaml data.features=wav2vec_c_mean model.type=sk/lr model.param_grid=\${cwdpath:../conf/clf/sk/lr/grids/default.yaml} results=results_cross/lr/wav2vec.csv | ||
ertk-cli exp2 exp_loco.yaml data.features=eGeMAPS model.type=sk/svm model.param_grid=\${cwdpath:../conf/clf/sk/svm/grids/rbf.yaml} results=results_cross/svm/eGeMAPS.csv | ||
ertk-cli exp2 exp_loco.yaml data.features=wav2vec_c_mean model.type=sk/svm model.param_grid=\${cwdpath:../conf/clf/sk/svm/grids/rbf.yaml} results=results_cross/svm/wav2vec.csv | ||
|
||
# Sequence models | ||
ertk-cli exp2 exp_loco.yaml training.normalise=none data.features=logmel-0.05-0.025-80 data.pad_seq=100 data.clip_seq=512 model.type=tf/aldeneh2017 model.config=\${cwdpath:aldeneh2017.yaml} results=results_cross/aldeneh2017/melspec.csv | ||
ertk-cli exp2 exp_loco.yaml training.normalise=none data.features=logmel-0.05-0.025-80 data.pad_seq=256 data.clip_seq=256 model.type=tf/zhao2019 model.config=\${cwdpath:zhao2019.yaml} results=results_cross/zhao2019/melspec.csv | ||
|
||
# ertk-cli exp2 exp_loco.yaml training.normalise=none data.features=logmel-0.05-0.025-80 data.pad_seq=100 data.clip_seq=512 model.type=pt/aldeneh2017 model.config=\${cwdpath:../conf/clf/pt/aldeneh2017/default.yaml} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
steps: 256 | ||
learning_rate: 1e-5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.