Skip to content

Commit

Permalink
Merge branch 'felixbur:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bagustris authored Jun 28, 2024
2 parents e2f4b93 + 12a5f42 commit a682235
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 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.88.3
--------------
* fixed bug in false uncertainty estimation
* changed demo live recording

Version 0.88.2
--------------
* changed combine speaker results to show speakers not samples
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.88.2"
VERSION="0.88.3"
SAMPLING_RATE = 16000
6 changes: 4 additions & 2 deletions nkululeko/demo_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ def run_demo(self):
else:
self.util.debug(df_res)
else:
while True:
answer = input("want to record y/n?")
while answer == "y":
signal = self.record_audio(3)
self.predict_signal(signal, self.sr)
answer = input("want to record y/n?")

# self.play_audio(signal)

Expand Down Expand Up @@ -109,7 +111,7 @@ def predict_signal(self, signal, sr):
def record_audio(self, seconds):
import sounddevice as sd

print("recording ...")
print("recording ...", flush=True)
y = sd.rec(int(seconds * self.sr), samplerate=self.sr, channels=1)
sd.wait()
y = y.T
Expand Down
4 changes: 2 additions & 2 deletions nkululeko/reporting/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ def print_probabilities(self):
and "uncertainty" not in self.probas
):
probas = self.probas
probas["predicted"] = self.preds
probas["truth"] = self.truths
# softmax the probabilities or logits
uncertainty = probas.apply(softmax, axis=1)
probas["predicted"] = self.preds
probas["truth"] = self.truths
try:
le = glob_conf.label_encoder
mapping = dict(zip(le.classes_, range(len(le.classes_))))
Expand Down
2 changes: 2 additions & 0 deletions tests/exp_emodb-aug_os_xgb.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ augmented.split_strategy = train
emodb.mapping = {'anger':'angry', 'happiness':'happy', 'sadness':'sad', 'neutral':'neutral'}
labels = ['angry', 'happy', 'neutral', 'sad']
target = emotion
[AUGMENT]
augment = ['traditional']
[FEATS]
type = ['os']
scale = standard
Expand Down
2 changes: 1 addition & 1 deletion tests/exp_emodb_os_mlp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ emodb.split_strategy = specified
emodb.test_tables = ['emotion.categories.test.gold_standard']
emodb.train_tables = ['emotion.categories.train.gold_standard']
target = emotion
labels = ['anger', 'happiness', 'sadness', 'fear']
labels = ['anger', 'happiness']
#no_reuse = True
[FEATS]
type = ['os']
Expand Down
2 changes: 1 addition & 1 deletion tests/exp_emodb_os_xgb.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ target = emotion
type = ['os']
store_format = csv
scale = standard
no_reuse = True
#no_reuse = True
[MODEL]
type = xgb
[PLOT]
Expand Down

0 comments on commit a682235

Please sign in to comment.