nkululeko 0.93.4__py3-none-any.whl → 0.93.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nkululeko/constants.py +1 -1
- nkululeko/data/dataset.py +26 -11
- nkululeko/resample.py +3 -3
- {nkululeko-0.93.4.dist-info → nkululeko-0.93.6.dist-info}/METADATA +13 -5
- {nkululeko-0.93.4.dist-info → nkululeko-0.93.6.dist-info}/RECORD +9 -9
- {nkululeko-0.93.4.dist-info → nkululeko-0.93.6.dist-info}/WHEEL +1 -1
- {nkululeko-0.93.4.dist-info → nkululeko-0.93.6.dist-info}/LICENSE +0 -0
- {nkululeko-0.93.4.dist-info → nkululeko-0.93.6.dist-info}/entry_points.txt +0 -0
- {nkululeko-0.93.4.dist-info → nkululeko-0.93.6.dist-info}/top_level.txt +0 -0
nkululeko/constants.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
VERSION="0.93.
|
1
|
+
VERSION="0.93.6"
|
2
2
|
SAMPLING_RATE = 16000
|
nkululeko/data/dataset.py
CHANGED
@@ -4,12 +4,13 @@ import os
|
|
4
4
|
import os.path
|
5
5
|
from random import sample
|
6
6
|
|
7
|
-
import audformat
|
8
7
|
import numpy as np
|
9
8
|
import pandas as pd
|
10
9
|
|
11
|
-
import
|
10
|
+
import audformat
|
11
|
+
|
12
12
|
from nkululeko.filter_data import DataFilter
|
13
|
+
import nkululeko.glob_conf as glob_conf
|
13
14
|
from nkululeko.plots import Plots
|
14
15
|
from nkululeko.reporting.report_item import ReportItem
|
15
16
|
from nkululeko.utils.util import Util
|
@@ -32,6 +33,9 @@ class Dataset:
|
|
32
33
|
self.target = self.util.config_val("DATA", "target", "none")
|
33
34
|
self.plot = Plots()
|
34
35
|
self.limit = int(self.util.config_val_data(self.name, "limit", 0))
|
36
|
+
self.target_tables_append = eval(
|
37
|
+
self.util.config_val_data(self.name, "target_tables_append", "False")
|
38
|
+
)
|
35
39
|
self.start_fresh = eval(self.util.config_val("DATA", "no_reuse", "False"))
|
36
40
|
self.is_labeled, self.got_speaker, self.got_gender, self.got_age = (
|
37
41
|
False,
|
@@ -158,14 +162,20 @@ class Dataset:
|
|
158
162
|
except KeyError:
|
159
163
|
# just a try...
|
160
164
|
pass
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
165
|
+
try:
|
166
|
+
if got_target2:
|
167
|
+
df[self.target] = df_target[self.target]
|
168
|
+
if got_speaker2:
|
169
|
+
df["speaker"] = df_target["speaker"]
|
170
|
+
if got_gender2:
|
171
|
+
df["gender"] = df_target["gender"]
|
172
|
+
if got_age2:
|
173
|
+
df["age"] = df_target["age"].astype(int)
|
174
|
+
except ValueError as ve:
|
175
|
+
self.util.error(
|
176
|
+
f"{ve}\nYou might need to set "
|
177
|
+
+ "data.target_tables_append = True"
|
178
|
+
)
|
169
179
|
# copy other column
|
170
180
|
for column in df_target.columns:
|
171
181
|
if column not in [self.target, "age", "speaker", "gender"]:
|
@@ -321,7 +331,12 @@ class Dataset:
|
|
321
331
|
for column in source_df.columns:
|
322
332
|
if column not in [self.target, "age", "speaker", "gender"]:
|
323
333
|
df_local[column] = source_df[column]
|
324
|
-
|
334
|
+
# ensure segmented index
|
335
|
+
df_local = self.util.make_segmented_index(df_local)
|
336
|
+
if self.target_tables_append:
|
337
|
+
df = pd.concat([df, df_local], axis=0)
|
338
|
+
else:
|
339
|
+
df = pd.concat([df, df_local], axis=1)
|
325
340
|
return df, is_labeled, got_speaker, got_gender, got_age
|
326
341
|
|
327
342
|
def split(self):
|
nkululeko/resample.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
"""
|
2
|
-
Resample audio files or INI files (train, test, all) to change the sampling rate.
|
1
|
+
"""Resample audio files or INI files (train, test, all) to change the sampling rate.
|
3
2
|
|
4
3
|
This script provides a command-line interface to resample audio files or INI files
|
5
4
|
containing train, test, and all data. It supports resampling a single file, a
|
@@ -27,9 +26,10 @@ import argparse
|
|
27
26
|
import configparser
|
28
27
|
import os
|
29
28
|
|
30
|
-
import audformat
|
31
29
|
import pandas as pd
|
32
30
|
|
31
|
+
import audformat
|
32
|
+
|
33
33
|
from nkululeko.augmenting.resampler import Resampler
|
34
34
|
from nkululeko.constants import VERSION
|
35
35
|
from nkululeko.experiment import Experiment
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nkululeko
|
3
|
-
Version: 0.93.
|
3
|
+
Version: 0.93.6
|
4
4
|
Summary: Machine learning audio prediction experiments based on templates
|
5
5
|
Home-page: https://github.com/felixbur/nkululeko
|
6
6
|
Author: Felix Burkhardt
|
@@ -20,7 +20,7 @@ Requires-Dist: audiofile
|
|
20
20
|
Requires-Dist: audiomentations
|
21
21
|
Requires-Dist: audmetric
|
22
22
|
Requires-Dist: audonnx
|
23
|
-
Requires-Dist:
|
23
|
+
Requires-Dist: confidence_intervals
|
24
24
|
Requires-Dist: datasets
|
25
25
|
Requires-Dist: imageio
|
26
26
|
Requires-Dist: matplotlib
|
@@ -28,12 +28,12 @@ Requires-Dist: numpy
|
|
28
28
|
Requires-Dist: opensmile
|
29
29
|
Requires-Dist: pandas
|
30
30
|
Requires-Dist: praat-parselmouth
|
31
|
-
Requires-Dist:
|
31
|
+
Requires-Dist: scikit_learn
|
32
32
|
Requires-Dist: scipy
|
33
33
|
Requires-Dist: seaborn
|
34
34
|
Requires-Dist: sounddevice
|
35
35
|
Requires-Dist: tensorflow
|
36
|
-
Requires-Dist:
|
36
|
+
Requires-Dist: tensorflow_hub
|
37
37
|
Requires-Dist: torch
|
38
38
|
Requires-Dist: torchvision
|
39
39
|
Requires-Dist: transformers
|
@@ -72,7 +72,7 @@ The idea is to have a framework (based on e.g. sklearn and torch) that can be us
|
|
72
72
|
* The latest features can be seen in [the ini-file](./ini_file.md) options that are used to control Nkululeko
|
73
73
|
* Below is a [Hello World example](#helloworld) that should set you up fastly, also on [Google Colab](https://colab.research.google.com/drive/1GYNBd5cdZQ1QC3Jm58qoeMaJg3UuPhjw?usp=sharing#scrollTo=4G_SjuF9xeQf), and [with Kaggle](https://www.kaggle.com/felixburk/nkululeko-hello-world-example)
|
74
74
|
* [Here's a blog post on how to set up nkululeko on your computer.](http://blog.syntheticspeech.de/2021/08/30/how-to-set-up-your-first-nkululeko-project/)
|
75
|
-
* [Here is a slack channel to discuss issues related to nkululeko](https://join.slack.com/t/nkululekoworkspace/shared_invite/zt-
|
75
|
+
* [Here is a slack channel to discuss issues related to nkululeko](https://join.slack.com/t/nkululekoworkspace/shared_invite/zt-2v3q3yfzk-XfNGoqLfp3ts9KfCZpfTyg). Please click the link if interested in contributing.
|
76
76
|
* [Here's a slide presentation about nkululeko](docs/nkululeko.pdf)
|
77
77
|
* [Here's a video presentation about nkululeko](https://www.youtube.com/playlist?list=PLRceVavtxLg0y2jiLmpnUfiMtfvkK912D)
|
78
78
|
* [Here's the 2022 LREC article on nkululeko](http://felix.syntheticspeech.de/publications/Nkululeko_LREC.pdf)
|
@@ -355,6 +355,14 @@ If you use it, please mention the Nkululeko paper:
|
|
355
355
|
Changelog
|
356
356
|
=========
|
357
357
|
|
358
|
+
Version 0.93.6
|
359
|
+
--------------
|
360
|
+
* added error message and hint for data.target_tables_append
|
361
|
+
|
362
|
+
Version 0.93.5
|
363
|
+
--------------
|
364
|
+
* fixed bug in dataset loading
|
365
|
+
|
358
366
|
Version 0.93.4
|
359
367
|
--------------
|
360
368
|
* ccc in plots now configurable
|
@@ -2,7 +2,7 @@ nkululeko/__init__.py,sha256=62f8HiEzJ8rG2QlTFJXUCMpvuH3fKI33DoJSj33mscc,63
|
|
2
2
|
nkululeko/aug_train.py,sha256=FoMbBrfyOZd4QAw7oIHl3X6-UpsqAKWVDIolCA7qOWs,3196
|
3
3
|
nkululeko/augment.py,sha256=3RzaxB3gRxovgJVjHXi0glprW01J7RaHhUkqotW2T3U,2955
|
4
4
|
nkululeko/cacheddataset.py,sha256=XFpWZmbJRg0pvhnIgYf0TkclxllD-Fctu-Ol0PF_00c,969
|
5
|
-
nkululeko/constants.py,sha256=
|
5
|
+
nkululeko/constants.py,sha256=CBvqIM1vafeKeZJAFI4K96rOgsKVLyvRhUJoNEsmOIo,39
|
6
6
|
nkululeko/demo-ft.py,sha256=iD9Pzp9QjyAv31q1cDZ75vPez7Ve8A4Cfukv5yfZdrQ,770
|
7
7
|
nkululeko/demo.py,sha256=4Yzhg6pCPBYPGJrP7JX2TysVosl_R1llpVDKc2P_gUA,4955
|
8
8
|
nkululeko/demo_feats.py,sha256=BvZjeNFTlERIRlq34OHM4Z96jdDQAhB01BGQAUcX9dM,2026
|
@@ -22,7 +22,7 @@ nkululeko/nkuluflag.py,sha256=PGWSmZz-PiiHLgcZJAoGOI_Y-sZDVI1ksB8p5r7riWM,3725
|
|
22
22
|
nkululeko/nkululeko.py,sha256=M7baIq2nAoi6dEoBL4ATEuqAs5U1fvl_hyqAl5DybAQ,2040
|
23
23
|
nkululeko/plots.py,sha256=emn2NpZyOGlC8pw0NdAGRbUkPzZzbOKFO50HZ7vJG40,25275
|
24
24
|
nkululeko/predict.py,sha256=MLnHEyFmSiHLLs-HDczag8Vu3zKF5T1rXLKdZZJ6py8,2083
|
25
|
-
nkululeko/resample.py,sha256=
|
25
|
+
nkululeko/resample.py,sha256=rn3-M1A-iwVGibfQNGyeYNa7briD24lIN9Szq_1uTJo,5194
|
26
26
|
nkululeko/runmanager.py,sha256=AswmORVUkCIH0gTx6zEyufvFATQBS8C5TXo2erSNdVg,7611
|
27
27
|
nkululeko/scaler.py,sha256=7VOZ4sREMoQtahfETt9RyuR29Fb7PCwxlYVjBbdCVFc,4101
|
28
28
|
nkululeko/segment.py,sha256=DRjC6b7SeInYgwBcDPXpTXPvXPS-J8kFQO7H095bK80,4945
|
@@ -49,7 +49,7 @@ nkululeko/autopredict/ap_stoi.py,sha256=UEQg1ZV0meAsxgdWB8ieRs9GPXHqArmsaOyCGRwp
|
|
49
49
|
nkululeko/autopredict/ap_valence.py,sha256=WrW4Ltqi_odW49_4QEVKkfnrcztLIVZ4cXIEHu4dBN8,1026
|
50
50
|
nkululeko/autopredict/estimate_snr.py,sha256=1k9-XadABudnsNOeFZD_Fg0E64-GUQVS7JEp82MLQS4,4995
|
51
51
|
nkululeko/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
|
-
nkululeko/data/dataset.py,sha256=
|
52
|
+
nkululeko/data/dataset.py,sha256=Sqk5XVArXVjwN-6B9uT0T9OkUPyoQwklJPqgDPPQgNE,29954
|
53
53
|
nkululeko/data/dataset_csv.py,sha256=p2b4eS5R2Q5zdOIc56NRRU2PTFXSRt0qrdHGafHkWKo,4830
|
54
54
|
nkululeko/feat_extract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
55
55
|
nkululeko/feat_extract/feats_agender.py,sha256=onfAQ6-xx_mFMJXEF1IX8cHBmGtGeX6weJmxbkfh1_o,3184
|
@@ -112,9 +112,9 @@ nkululeko/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
112
112
|
nkululeko/utils/files.py,sha256=SrrYaU7AB80MZHiV1jcB0h_zigvYLYgSVNTXV4ao38g,4593
|
113
113
|
nkululeko/utils/stats.py,sha256=vCRzhCR0Gx5SiJyAGbj1TIto8ocGz58CM5Pr3LltagA,2948
|
114
114
|
nkululeko/utils/util.py,sha256=wFDslqxpCVDwi6LBakIFDDy1kYsxt5G7ykE38CocmtA,16880
|
115
|
-
nkululeko-0.93.
|
116
|
-
nkululeko-0.93.
|
117
|
-
nkululeko-0.93.
|
118
|
-
nkululeko-0.93.
|
119
|
-
nkululeko-0.93.
|
120
|
-
nkululeko-0.93.
|
115
|
+
nkululeko-0.93.6.dist-info/LICENSE,sha256=0zGP5B_W35yAcGfHPS18Q2B8UhvLRY3dQq1MhpsJU_U,1076
|
116
|
+
nkululeko-0.93.6.dist-info/METADATA,sha256=Dx6ZisILoZzC7-BXKBskHm-mBPzjY8CEaiRVOo2vlc0,42364
|
117
|
+
nkululeko-0.93.6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
118
|
+
nkululeko-0.93.6.dist-info/entry_points.txt,sha256=lNTkFEdh6Kjo5o95ZAWf_0Lq-4ztGoAoMVSDuPtuyS0,442
|
119
|
+
nkululeko-0.93.6.dist-info/top_level.txt,sha256=DPFNNSHPjUeVKj44dVANAjuVGRCC3MusJ08lc2a8xFA,10
|
120
|
+
nkululeko-0.93.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|