Skip to content

Commit

Permalink
redo demo predictor
Browse files Browse the repository at this point in the history
  • Loading branch information
bagustris committed Apr 16, 2024
2 parents 64bb295 + 975c3b4 commit 5beb3ce
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 130 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

Version 0.81.2
--------------
* added a parselmouth.Praat error if pitch out of range
* changed file path for demo_predictor

Version 0.81.1
--------------
* fixed bugs in demo module
Expand Down
8 changes: 4 additions & 4 deletions data/asvp-esd/exp.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[EXP]
root = ./
name = results/exp_asvp_aud
root = ./results
name = exp_asvp_aud1
save = True
[DATA]
databases = ['train', 'test']
Expand All @@ -14,9 +14,9 @@ test.absolute_path = False
test.split_strategy = test
target = emotion
; no_reuse = True
; labels =["boredom","neutral","happy", "sad","anger", "fear", "disgust", "surprise", "excited","pleasure","pain","disapointed"]
labels =["boredom","neutral","happy", "sad","anger", "fear", "disgust", "surprise", "excited","pleasure","pain"]
; no_reuse = True
labels =["neutral", "happy", "sad", "anger"]
; labels =["neutral", "happy", "sad", "anger"]
; check_size = 1000
; min_duration_of_samples = 2
[FEATS]
Expand Down
2 changes: 1 addition & 1 deletion nkululeko/constants.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION="0.81.1"
VERSION="0.81.2"
SAMPLING_RATE = 16000
5 changes: 4 additions & 1 deletion nkululeko/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ def load(self):
if column not in [self.target, "age", "speaker", "gender"]:
df[column] = df_target[column]
except audformat.core.errors.BadKeyError:
pass
if not self.is_labeled:
self.util.error(
f"Giving up: no target ({self.target}) column found"
)

if self.is_labeled:
# remember the target in case they get labelencoded later
Expand Down
122 changes: 0 additions & 122 deletions nkululeko/demo_predictor.py

This file was deleted.

4 changes: 2 additions & 2 deletions nkululeko/feat_extract/feinberg_praat.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ def compute_features(file_index):
f4_median,
) = measureFormants(sound, 75, 300)
# file_list.append(wave_file) # make an ID list
except statistics.StatisticsError as se:
print(f"error on file {wave_file}: {se}")
except (statistics.StatisticsError, parselmouth.PraatError) as errors:
print(f"error on file {wave_file}: {errors}")

duration_list.append(duration) # make duration list
mean_F0_list.append(meanF0) # make a mean F0 list
Expand Down

0 comments on commit 5beb3ce

Please sign in to comment.