nkululeko 0.90.1__tar.gz → 0.90.3__tar.gz

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.
Files changed (174) hide show
  1. {nkululeko-0.90.1 → nkululeko-0.90.3}/CHANGELOG.md +9 -0
  2. {nkululeko-0.90.1/nkululeko.egg-info → nkululeko-0.90.3}/PKG-INFO +11 -2
  3. {nkululeko-0.90.1 → nkululeko-0.90.3}/README.md +1 -1
  4. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/augment.py +3 -7
  5. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/constants.py +1 -1
  6. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/demo.py +2 -3
  7. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/explore.py +5 -12
  8. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/export.py +3 -10
  9. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_tuned.py +34 -8
  10. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/nkululeko.py +7 -6
  11. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/predict.py +3 -10
  12. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/resample.py +24 -3
  13. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/segment.py +3 -10
  14. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/utils/util.py +2 -2
  15. {nkululeko-0.90.1 → nkululeko-0.90.3/nkululeko.egg-info}/PKG-INFO +11 -2
  16. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko.egg-info/SOURCES.txt +1 -2
  17. nkululeko-0.90.3/nkululeko.egg-info/entry_points.txt +10 -0
  18. nkululeko-0.90.3/setup.py +21 -0
  19. nkululeko-0.90.1/nkululeko/experiment_felix.py +0 -728
  20. nkululeko-0.90.1/nkululeko/resample_cli.py +0 -99
  21. nkululeko-0.90.1/setup.py +0 -3
  22. {nkululeko-0.90.1 → nkululeko-0.90.3}/LICENSE +0 -0
  23. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/aesdd/process_database.py +0 -0
  24. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/androids/process_database.py +0 -0
  25. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/ased/process_database.py +0 -0
  26. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/asvp-esd/process_database.py +0 -0
  27. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/baved/process_database.py +0 -0
  28. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/cafe/process_database.py +0 -0
  29. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/clac/process_database.py +0 -0
  30. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/cmu-mosei/process_database.py +0 -0
  31. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/demos/process_database.py +0 -0
  32. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/ekorpus/process_database.py +0 -0
  33. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/emns/process_database.py +0 -0
  34. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/emofilm/convert_to_16k.py +0 -0
  35. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/emofilm/process_database.py +0 -0
  36. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/emorynlp/process_database.py +0 -0
  37. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/emov-db/process_database.py +0 -0
  38. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/emovo/process_database.py +0 -0
  39. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/emozionalmente/create.py +0 -0
  40. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/enterface/process_database.py +0 -0
  41. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/esd/process_database.py +0 -0
  42. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/gerparas/process_database.py +0 -0
  43. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/iemocap/process_database.py +0 -0
  44. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/jl/process_database.py +0 -0
  45. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/jtes/process_database.py +0 -0
  46. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/meld/process_database.py +0 -0
  47. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/mesd/process_database.py +0 -0
  48. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/mess/process_database.py +0 -0
  49. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/mlendsnd/process_database.py +0 -0
  50. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/msp-improv/process_database2.py +0 -0
  51. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/msp-podcast/process_database.py +0 -0
  52. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/oreau2/process_database.py +0 -0
  53. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/portuguese/process_database.py +0 -0
  54. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/ravdess/process_database.py +0 -0
  55. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/ravdess/process_database_speaker.py +0 -0
  56. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/savee/process_database.py +0 -0
  57. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/shemo/process_database.py +0 -0
  58. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/subesco/process_database.py +0 -0
  59. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/tess/process_database.py +0 -0
  60. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/thorsten-emotional/process_database.py +0 -0
  61. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/urdu/process_database.py +0 -0
  62. {nkululeko-0.90.1 → nkululeko-0.90.3}/data/vivae/process_database.py +0 -0
  63. {nkululeko-0.90.1 → nkululeko-0.90.3}/docs/source/conf.py +0 -0
  64. {nkululeko-0.90.1 → nkululeko-0.90.3}/meta/demos/demo_best_model.py +0 -0
  65. {nkululeko-0.90.1 → nkululeko-0.90.3}/meta/demos/my_experiment.py +0 -0
  66. {nkululeko-0.90.1 → nkululeko-0.90.3}/meta/demos/my_experiment_local.py +0 -0
  67. {nkululeko-0.90.1 → nkululeko-0.90.3}/meta/demos/plot_faster_anim.py +0 -0
  68. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/__init__.py +0 -0
  69. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/aug_train.py +0 -0
  70. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/augmenting/__init__.py +0 -0
  71. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/augmenting/augmenter.py +0 -0
  72. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/augmenting/randomsplicer.py +0 -0
  73. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/augmenting/randomsplicing.py +0 -0
  74. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/augmenting/resampler.py +0 -0
  75. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/__init__.py +0 -0
  76. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_age.py +0 -0
  77. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_arousal.py +0 -0
  78. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_dominance.py +0 -0
  79. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_gender.py +0 -0
  80. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_mos.py +0 -0
  81. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_pesq.py +0 -0
  82. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_sdr.py +0 -0
  83. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_snr.py +0 -0
  84. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_stoi.py +0 -0
  85. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/ap_valence.py +0 -0
  86. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/autopredict/estimate_snr.py +0 -0
  87. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/cacheddataset.py +0 -0
  88. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/data/__init__.py +0 -0
  89. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/data/dataset.py +0 -0
  90. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/data/dataset_csv.py +0 -0
  91. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/demo-ft.py +0 -0
  92. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/demo_feats.py +0 -0
  93. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/demo_predictor.py +0 -0
  94. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/ensemble.py +0 -0
  95. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/experiment.py +0 -0
  96. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/__init__.py +0 -0
  97. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_agender.py +0 -0
  98. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_agender_agender.py +0 -0
  99. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_analyser.py +0 -0
  100. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_ast.py +0 -0
  101. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_auddim.py +0 -0
  102. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_audmodel.py +0 -0
  103. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_clap.py +0 -0
  104. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_hubert.py +0 -0
  105. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_import.py +0 -0
  106. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_mld.py +0 -0
  107. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_mos.py +0 -0
  108. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_opensmile.py +0 -0
  109. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_oxbow.py +0 -0
  110. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_praat.py +0 -0
  111. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_snr.py +0 -0
  112. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_spectra.py +0 -0
  113. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_spkrec.py +0 -0
  114. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_squim.py +0 -0
  115. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_trill.py +0 -0
  116. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_wav2vec2.py +0 -0
  117. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_wavlm.py +0 -0
  118. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feats_whisper.py +0 -0
  119. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/featureset.py +0 -0
  120. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/feinberg_praat.py +0 -0
  121. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feat_extract/transformer_feature_extractor.py +0 -0
  122. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/feature_extractor.py +0 -0
  123. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/file_checker.py +0 -0
  124. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/filter_data.py +0 -0
  125. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/fixedsegment.py +0 -0
  126. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/glob_conf.py +0 -0
  127. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/losses/__init__.py +0 -0
  128. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/losses/loss_ccc.py +0 -0
  129. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/losses/loss_softf1loss.py +0 -0
  130. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/modelrunner.py +0 -0
  131. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/__init__.py +0 -0
  132. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model.py +0 -0
  133. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_bayes.py +0 -0
  134. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_cnn.py +0 -0
  135. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_gmm.py +0 -0
  136. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_knn.py +0 -0
  137. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_knn_reg.py +0 -0
  138. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_lin_reg.py +0 -0
  139. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_mlp.py +0 -0
  140. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_mlp_regression.py +0 -0
  141. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_svm.py +0 -0
  142. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_svr.py +0 -0
  143. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_tree.py +0 -0
  144. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_tree_reg.py +0 -0
  145. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_xgb.py +0 -0
  146. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/models/model_xgr.py +0 -0
  147. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/multidb.py +0 -0
  148. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/nkuluflag.py +0 -0
  149. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/plots.py +0 -0
  150. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/reporting/__init__.py +0 -0
  151. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/reporting/defines.py +0 -0
  152. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/reporting/latex_writer.py +0 -0
  153. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/reporting/report.py +0 -0
  154. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/reporting/report_item.py +0 -0
  155. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/reporting/reporter.py +0 -0
  156. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/reporting/result.py +0 -0
  157. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/runmanager.py +0 -0
  158. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/scaler.py +0 -0
  159. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/segmenting/__init__.py +0 -0
  160. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/segmenting/seg_inaspeechsegmenter.py +0 -0
  161. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/segmenting/seg_silero.py +0 -0
  162. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/syllable_nuclei.py +0 -0
  163. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/test.py +0 -0
  164. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/test_predictor.py +0 -0
  165. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/test_pretrain.py +0 -0
  166. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/utils/__init__.py +0 -0
  167. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/utils/files.py +0 -0
  168. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko/utils/stats.py +0 -0
  169. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko.egg-info/dependency_links.txt +0 -0
  170. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko.egg-info/requires.txt +0 -0
  171. {nkululeko-0.90.1 → nkululeko-0.90.3}/nkululeko.egg-info/top_level.txt +0 -0
  172. {nkululeko-0.90.1 → nkululeko-0.90.3}/pyproject.toml +0 -0
  173. {nkululeko-0.90.1 → nkululeko-0.90.3}/setup.cfg +0 -0
  174. {nkululeko-0.90.1 → nkululeko-0.90.3}/venv/bin/activate_this.py +0 -0
@@ -1,6 +1,15 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ Version 0.90.3
5
+ --------------
6
+ * refactorings and documentations
7
+
8
+ Version 0.90.2
9
+ --------------
10
+ * added probability output to finetuning classification models
11
+ * switched path to prob. output from "store" to "results"
12
+
4
13
  Version 0.90.1
5
14
  --------------
6
15
  * Add balancing for finetune and update data README
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nkululeko
3
- Version: 0.90.1
3
+ Version: 0.90.3
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
@@ -68,7 +68,7 @@ A project to detect speaker characteristics by machine learning experiments with
68
68
 
69
69
  The idea is to have a framework (based on e.g. sklearn and torch) that can be used to rapidly and automatically analyse audio data and explore machine learning models based on that data.
70
70
 
71
- * NEW with nkululek: [Ensemble learning](http://blog.syntheticspeech.de/2024/06/25/nkululeko-ensemble-classifiers-with-late-fusion/)
71
+ * NEW with nkululeko: [Ensemble learning](http://blog.syntheticspeech.de/2024/06/25/nkululeko-ensemble-classifiers-with-late-fusion/)
72
72
  * NEW: [Finetune transformer-models](http://blog.syntheticspeech.de/2024/05/29/nkululeko-how-to-finetune-a-transformer-model/)
73
73
  * The latest features can be seen in [the ini-file](./ini_file.md) options that are used to control Nkululeko
74
74
  * 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)
@@ -356,6 +356,15 @@ F. Burkhardt, Johannes Wagner, Hagen Wierstorf, Florian Eyben and Björn Schulle
356
356
  Changelog
357
357
  =========
358
358
 
359
+ Version 0.90.3
360
+ --------------
361
+ * refactorings and documentations
362
+
363
+ Version 0.90.2
364
+ --------------
365
+ * added probability output to finetuning classification models
366
+ * switched path to prob. output from "store" to "results"
367
+
359
368
  Version 0.90.1
360
369
  --------------
361
370
  * Add balancing for finetune and update data README
@@ -24,7 +24,7 @@ A project to detect speaker characteristics by machine learning experiments with
24
24
 
25
25
  The idea is to have a framework (based on e.g. sklearn and torch) that can be used to rapidly and automatically analyse audio data and explore machine learning models based on that data.
26
26
 
27
- * NEW with nkululek: [Ensemble learning](http://blog.syntheticspeech.de/2024/06/25/nkululeko-ensemble-classifiers-with-late-fusion/)
27
+ * NEW with nkululeko: [Ensemble learning](http://blog.syntheticspeech.de/2024/06/25/nkululeko-ensemble-classifiers-with-late-fusion/)
28
28
  * NEW: [Finetune transformer-models](http://blog.syntheticspeech.de/2024/05/29/nkululeko-how-to-finetune-a-transformer-model/)
29
29
  * The latest features can be seen in [the ini-file](./ini_file.md) options that are used to control Nkululeko
30
30
  * 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)
@@ -83,17 +83,13 @@ def doit(config_file):
83
83
  print("DONE")
84
84
 
85
85
 
86
- def main(src_dir):
86
+ def main():
87
87
  parser = argparse.ArgumentParser(description="Call the nkululeko framework.")
88
88
  parser.add_argument("--config", default="exp.ini", help="The base configuration")
89
89
  args = parser.parse_args()
90
- if args.config is not None:
91
- config_file = args.config
92
- else:
93
- config_file = f"{src_dir}/exp.ini"
90
+ config_file = args.config if args.config is not None else "exp.ini"
94
91
  doit(config_file)
95
92
 
96
93
 
97
94
  if __name__ == "__main__":
98
- cwd = os.path.dirname(os.path.abspath(__file__))
99
- main(cwd) # use this if you want to state the config file path on command line
95
+ main()
@@ -1,2 +1,2 @@
1
- VERSION = "0.90.1"
1
+ VERSION="0.90.3"
2
2
  SAMPLING_RATE = 16000
@@ -30,7 +30,7 @@ from nkululeko.experiment import Experiment
30
30
  from nkululeko.utils.util import Util
31
31
 
32
32
 
33
- def main(src_dir):
33
+ def main():
34
34
  parser = argparse.ArgumentParser(description="Call the nkululeko DEMO framework.")
35
35
  parser.add_argument("--config", default="exp.ini", help="The base configuration")
36
36
  parser.add_argument(
@@ -142,5 +142,4 @@ def main(src_dir):
142
142
 
143
143
 
144
144
  if __name__ == "__main__":
145
- cwd = os.path.dirname(os.path.abspath(__file__))
146
- main(cwd) # use this if you want to state the config file path on command line
145
+ main()
@@ -25,33 +25,27 @@ for an `exp.ini` file in the same directory as the script.
25
25
 
26
26
  import argparse
27
27
  import configparser
28
- import os
28
+ from pathlib import Path
29
29
 
30
30
  from nkululeko.constants import VERSION
31
31
  from nkululeko.experiment import Experiment
32
32
  from nkululeko.utils.util import Util
33
33
 
34
34
 
35
- def main(src_dir):
35
+ def main():
36
36
  parser = argparse.ArgumentParser(
37
37
  description="Call the nkululeko EXPLORE framework."
38
38
  )
39
39
  parser.add_argument("--config", default="exp.ini", help="The base configuration")
40
40
  args = parser.parse_args()
41
- if args.config is not None:
42
- config_file = args.config
43
- else:
44
- config_file = f"{src_dir}/exp.ini"
41
+ config_file = args.config if args.config is not None else "exp.ini"
45
42
 
46
- # test if the configuration file exists
47
- if not os.path.isfile(config_file):
43
+ if not Path(config_file).is_file():
48
44
  print(f"ERROR: no such file: {config_file}")
49
45
  exit()
50
46
 
51
- # load one configuration per experiment
52
47
  config = configparser.ConfigParser()
53
48
  config.read(config_file)
54
- # create a new experiment
55
49
  expr = Experiment(config)
56
50
  module = "explore"
57
51
  expr.set_module(module)
@@ -101,5 +95,4 @@ def main(src_dir):
101
95
 
102
96
 
103
97
  if __name__ == "__main__":
104
- cwd = os.path.dirname(os.path.abspath(__file__))
105
- main(cwd) # use this if you want to state the config file path on command line
98
+ main()
@@ -15,24 +15,18 @@ from nkululeko.experiment import Experiment
15
15
  from nkululeko.utils.util import Util
16
16
 
17
17
 
18
- def main(src_dir):
18
+ def main():
19
19
  parser = argparse.ArgumentParser(description="Call the nkululeko framework.")
20
20
  parser.add_argument("--config", default="exp.ini", help="The base configuration")
21
21
  args = parser.parse_args()
22
- if args.config is not None:
23
- config_file = args.config
24
- else:
25
- config_file = f"{src_dir}/exp.ini"
22
+ config_file = args.config if args.config is not None else "exp.ini"
26
23
 
27
- # test if the configuration file exists
28
24
  if not os.path.isfile(config_file):
29
25
  print(f"ERROR: no such file: {config_file}")
30
26
  exit()
31
27
 
32
- # load one configuration per experiment
33
28
  config = configparser.ConfigParser()
34
29
  config.read(config_file)
35
- # create a new experiment
36
30
  expr = Experiment(config)
37
31
  util = Util("export")
38
32
  util.debug(
@@ -122,5 +116,4 @@ def main(src_dir):
122
116
 
123
117
 
124
118
  if __name__ == "__main__":
125
- cwd = os.path.dirname(os.path.abspath(__file__))
126
- main(cwd) # use this if you want to state the config file path on command line
119
+ main()
@@ -30,10 +30,16 @@ class TunedModel(BaseModel):
30
30
  """Constructor taking the configuration and all dataframes."""
31
31
  super().__init__(df_train, df_test, feats_train, feats_test)
32
32
  super().set_model_type("finetuned")
33
+ self.df_test, self.df_train, self.feats_test, self.feats_train = (
34
+ df_test,
35
+ df_train,
36
+ feats_test,
37
+ feats_train,
38
+ )
33
39
  self.name = "finetuned_wav2vec2"
34
40
  self.target = glob_conf.config["DATA"]["target"]
35
- labels = glob_conf.labels
36
- self.class_num = len(labels)
41
+ self.labels = glob_conf.labels
42
+ self.class_num = len(self.labels)
37
43
  device = self.util.config_val("MODEL", "device", False)
38
44
  if not device:
39
45
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -304,7 +310,7 @@ class TunedModel(BaseModel):
304
310
  else:
305
311
  self.util.error(f"criterion {criterion} not supported for classifier")
306
312
  else:
307
- self.criterion = self.util.config_val("MODEL", "loss", "ccc")
313
+ criterion = self.util.config_val("MODEL", "loss", "1-ccc")
308
314
  if criterion == "1-ccc":
309
315
  criterion = ConcordanceCorCoeff()
310
316
  elif criterion == "mse":
@@ -402,7 +408,7 @@ class TunedModel(BaseModel):
402
408
  self.load(self.run, self.epoch)
403
409
 
404
410
  def get_predictions(self):
405
- results = []
411
+ results = [[]].pop(0)
406
412
  for (file, start, end), _ in audeer.progress_bar(
407
413
  self.df_test.iterrows(),
408
414
  total=len(self.df_test),
@@ -415,18 +421,37 @@ class TunedModel(BaseModel):
415
421
  file, duration=end - start, offset=start, always_2d=True
416
422
  )
417
423
  assert sr == self.sampling_rate
418
- predictions = self.model.predict(signal)
419
- results.append(predictions.argmax())
420
- return results
424
+ prediction = self.model.predict(signal)
425
+ results.append(prediction)
426
+ # results.append(predictions.argmax())
427
+ predictions = np.asarray(results)
428
+ if self.util.exp_is_classification():
429
+ # make a dataframe for the class probabilities
430
+ proba_d = {}
431
+ for c in range(self.class_num):
432
+ proba_d[c] = []
433
+ # get the class probabilities
434
+ # predictions = self.clf.predict_proba(self.feats_test.to_numpy())
435
+ # pred = self.clf.predict(features)
436
+ for i in range(self.class_num):
437
+ proba_d[i] = list(predictions.T[i])
438
+ probas = pd.DataFrame(proba_d)
439
+ probas = probas.set_index(self.df_test.index)
440
+ predictions = probas.idxmax(axis=1).values
441
+ else:
442
+ predictions = predictions.flatten()
443
+ probas = None
444
+ return predictions, probas
421
445
 
422
446
  def predict(self):
423
447
  """Predict the whole eval feature set"""
424
- predictions = self.get_predictions()
448
+ predictions, probas = self.get_predictions()
425
449
  report = Reporter(
426
450
  self.df_test[self.target].to_numpy().astype(float),
427
451
  predictions,
428
452
  self.run,
429
453
  self.epoch_num,
454
+ probas=probas,
430
455
  )
431
456
  self._plot_epoch_progression(report)
432
457
  return report
@@ -438,6 +463,7 @@ class TunedModel(BaseModel):
438
463
  )
439
464
  with open(log_file, "r") as file:
440
465
  data = file.read()
466
+ data = data.strip().replace("nan", "0")
441
467
  list = ast.literal_eval(data)
442
468
  epochs, vals, loss = [], [], []
443
469
  for index, tp in enumerate(list):
@@ -2,7 +2,7 @@
2
2
  # Entry script to do a Nkululeko experiment
3
3
  import argparse
4
4
  import configparser
5
- import os.path
5
+ from pathlib import Path
6
6
 
7
7
  import numpy as np
8
8
 
@@ -13,7 +13,7 @@ from nkululeko.utils.util import Util
13
13
 
14
14
  def doit(config_file):
15
15
  # test if the configuration file exists
16
- if not os.path.isfile(config_file):
16
+ if not Path(config_file).is_file():
17
17
  print(f"ERROR: no such file: {config_file}")
18
18
  exit()
19
19
 
@@ -57,17 +57,18 @@ def doit(config_file):
57
57
  return result, int(np.asarray(last_epochs).min())
58
58
 
59
59
 
60
- def main(src_dir):
60
+ def main():
61
+ cwd = Path(__file__).parent.absolute()
61
62
  parser = argparse.ArgumentParser(description="Call the nkululeko framework.")
63
+ parser.add_argument("--version", action="version", version=f"Nkululeko {VERSION}")
62
64
  parser.add_argument("--config", default="exp.ini", help="The base configuration")
63
65
  args = parser.parse_args()
64
66
  if args.config is not None:
65
67
  config_file = args.config
66
68
  else:
67
- config_file = f"{src_dir}/exp.ini"
69
+ config_file = cwd / "exp.ini"
68
70
  doit(config_file)
69
71
 
70
72
 
71
73
  if __name__ == "__main__":
72
- cwd = os.path.dirname(os.path.abspath(__file__))
73
- main(cwd) # use this if you want to state the config file path on command line
74
+ main() # use this if you want to state the config file path on command line
@@ -24,26 +24,20 @@ from nkululeko.experiment import Experiment
24
24
  from nkululeko.utils.util import Util
25
25
 
26
26
 
27
- def main(src_dir):
27
+ def main():
28
28
  parser = argparse.ArgumentParser(
29
29
  description="Call the nkululeko PREDICT framework."
30
30
  )
31
31
  parser.add_argument("--config", default="exp.ini", help="The base configuration")
32
32
  args = parser.parse_args()
33
- if args.config is not None:
34
- config_file = args.config
35
- else:
36
- config_file = f"{src_dir}/exp.ini"
33
+ config_file = args.config if args.config is not None else "exp.ini"
37
34
 
38
- # test if the configuration file exists
39
35
  if not os.path.isfile(config_file):
40
36
  print(f"ERROR: no such file: {config_file}")
41
37
  exit()
42
38
 
43
- # load one configuration per experiment
44
39
  config = configparser.ConfigParser()
45
40
  config.read(config_file)
46
- # create a new experiment
47
41
  expr = Experiment(config)
48
42
  module = "predict"
49
43
  expr.set_module(module)
@@ -73,5 +67,4 @@ def main(src_dir):
73
67
 
74
68
 
75
69
  if __name__ == "__main__":
76
- cwd = os.path.dirname(os.path.abspath(__file__))
77
- main(cwd) # use this if you want to state the config file path on command line
70
+ main()
@@ -1,3 +1,25 @@
1
+ """
2
+ Resample audio files or INI files (train, test, all) to change the sampling rate.
3
+
4
+ This script provides a command-line interface to resample audio files or INI files
5
+ containing train, test, and all data. It supports resampling a single file, a
6
+ directory of files, or all files specified in an INI configuration file.
7
+
8
+ The script uses the `Resampler` class from the `nkululeko.augmenting.resampler`
9
+ module to perform the resampling operation. It can optionally replace the original
10
+ audio files with the resampled versions.
11
+
12
+ The script supports the following command-line arguments:
13
+ - `--config`: The base configuration file (INI format) to use for resampling.
14
+ - `--file`: The input audio file to resample.
15
+ - `--folder`: The input directory containing audio files and subdirectories to resample.
16
+ - `--replace`: Whether to replace the original audio files with the resampled versions.
17
+
18
+ The script also supports loading configuration from an INI file, which can be used
19
+ to specify the sample selection (all, train, or test) and whether to replace the
20
+ original files.
21
+ """
22
+
1
23
  # resample.py
2
24
  # change the sampling rate for audio file or INI file (train, test, all)
3
25
 
@@ -15,7 +37,7 @@ from nkululeko.utils.files import find_files
15
37
  from nkululeko.utils.util import Util
16
38
 
17
39
 
18
- def main(src_dir):
40
+ def main():
19
41
  parser = argparse.ArgumentParser(
20
42
  description="Call the nkululeko RESAMPLE framework."
21
43
  )
@@ -118,5 +140,4 @@ def main(src_dir):
118
140
 
119
141
 
120
142
  if __name__ == "__main__":
121
- cwd = os.path.dirname(os.path.abspath(__file__))
122
- main(cwd)
143
+ main()
@@ -14,24 +14,18 @@ from nkululeko.reporting.report_item import ReportItem
14
14
  from nkululeko.utils.util import Util
15
15
 
16
16
 
17
- def main(src_dir):
17
+ def main():
18
18
  parser = argparse.ArgumentParser(description="Call the nkululeko framework.")
19
19
  parser.add_argument("--config", default="exp.ini", help="The base configuration")
20
20
  args = parser.parse_args()
21
- if args.config is not None:
22
- config_file = args.config
23
- else:
24
- config_file = f"{src_dir}/exp.ini"
21
+ config_file = args.config if args.config is not None else "exp.ini"
25
22
 
26
- # test if the configuration file exists
27
23
  if not os.path.isfile(config_file):
28
24
  print(f"ERROR: no such file: {config_file}")
29
25
  exit()
30
26
 
31
- # load one configuration per experiment
32
27
  config = configparser.ConfigParser()
33
28
  config.read(config_file)
34
- # create a new experiment
35
29
  expr = Experiment(config)
36
30
  module = "segment"
37
31
  expr.set_module(module)
@@ -153,5 +147,4 @@ def segment_dataframe(df):
153
147
 
154
148
 
155
149
  if __name__ == "__main__":
156
- cwd = os.path.dirname(os.path.abspath(__file__))
157
- main(cwd) # use this if you want to state the config file path on command line
150
+ main() # use this if you want to state the config file path on command line
@@ -155,10 +155,10 @@ class Util:
155
155
  return f"{store}/{self.get_exp_name()}.pkl"
156
156
 
157
157
  def get_pred_name(self):
158
- store = self.get_path("store")
158
+ results_dir = self.get_path("res_dir")
159
159
  target = self.get_target_name()
160
160
  pred_name = self.get_model_description()
161
- return f"{store}/pred_{target}_{pred_name}.csv"
161
+ return f"{results_dir}/pred_{target}_{pred_name}.csv"
162
162
 
163
163
  def is_categorical(self, pd_series):
164
164
  """Check if a dataframe column is categorical."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nkululeko
3
- Version: 0.90.1
3
+ Version: 0.90.3
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
@@ -68,7 +68,7 @@ A project to detect speaker characteristics by machine learning experiments with
68
68
 
69
69
  The idea is to have a framework (based on e.g. sklearn and torch) that can be used to rapidly and automatically analyse audio data and explore machine learning models based on that data.
70
70
 
71
- * NEW with nkululek: [Ensemble learning](http://blog.syntheticspeech.de/2024/06/25/nkululeko-ensemble-classifiers-with-late-fusion/)
71
+ * NEW with nkululeko: [Ensemble learning](http://blog.syntheticspeech.de/2024/06/25/nkululeko-ensemble-classifiers-with-late-fusion/)
72
72
  * NEW: [Finetune transformer-models](http://blog.syntheticspeech.de/2024/05/29/nkululeko-how-to-finetune-a-transformer-model/)
73
73
  * The latest features can be seen in [the ini-file](./ini_file.md) options that are used to control Nkululeko
74
74
  * 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)
@@ -356,6 +356,15 @@ F. Burkhardt, Johannes Wagner, Hagen Wierstorf, Florian Eyben and Björn Schulle
356
356
  Changelog
357
357
  =========
358
358
 
359
+ Version 0.90.3
360
+ --------------
361
+ * refactorings and documentations
362
+
363
+ Version 0.90.2
364
+ --------------
365
+ * added probability output to finetuning classification models
366
+ * switched path to prob. output from "store" to "results"
367
+
359
368
  Version 0.90.1
360
369
  --------------
361
370
  * Add balancing for finetune and update data README
@@ -60,7 +60,6 @@ nkululeko/demo_feats.py
60
60
  nkululeko/demo_predictor.py
61
61
  nkululeko/ensemble.py
62
62
  nkululeko/experiment.py
63
- nkululeko/experiment_felix.py
64
63
  nkululeko/explore.py
65
64
  nkululeko/export.py
66
65
  nkululeko/feature_extractor.py
@@ -75,7 +74,6 @@ nkululeko/nkululeko.py
75
74
  nkululeko/plots.py
76
75
  nkululeko/predict.py
77
76
  nkululeko/resample.py
78
- nkululeko/resample_cli.py
79
77
  nkululeko/runmanager.py
80
78
  nkululeko/scaler.py
81
79
  nkululeko/segment.py
@@ -86,6 +84,7 @@ nkululeko/test_pretrain.py
86
84
  nkululeko.egg-info/PKG-INFO
87
85
  nkululeko.egg-info/SOURCES.txt
88
86
  nkululeko.egg-info/dependency_links.txt
87
+ nkululeko.egg-info/entry_points.txt
89
88
  nkululeko.egg-info/requires.txt
90
89
  nkululeko.egg-info/top_level.txt
91
90
  nkululeko/augmenting/__init__.py
@@ -0,0 +1,10 @@
1
+ [console_scripts]
2
+ nkululeko.augment = nkululeko.augment:main
3
+ nkululeko.demo = nkululeko.demo:main
4
+ nkululeko.explore = nkululeko.explore:main
5
+ nkululeko.export = nkululeko.export:main
6
+ nkululeko.nkululeko = nkululeko.nkululeko:main
7
+ nkululeko.predict = nkululeko.predict:main
8
+ nkululeko.resample = nkululeko.resample:main
9
+ nkululeko.segment = nkululeko.segment:main
10
+ nkululeko.test = nkululeko.test:main
@@ -0,0 +1,21 @@
1
+ # from nkululeko.constants import VERSION
2
+ from setuptools import setup
3
+
4
+ setup(
5
+ use_scm_version=True,
6
+ # version=VERSION,
7
+ entry_points={
8
+ "console_scripts": [
9
+ # 'nkululeko=nkululeko.nkululeko:main',
10
+ "nkululeko.explore=nkululeko.explore:main",
11
+ "nkululeko.nkululeko=nkululeko.nkululeko:main",
12
+ "nkululeko.augment=nkululeko.augment:main",
13
+ "nkululeko.demo=nkululeko.demo:main",
14
+ "nkululeko.export=nkululeko.export:main",
15
+ "nkululeko.predict=nkululeko.predict:main",
16
+ "nkululeko.resample=nkululeko.resample:main",
17
+ "nkululeko.segment=nkululeko.segment:main",
18
+ "nkululeko.test=nkululeko.test:main",
19
+ ],
20
+ },
21
+ )