sonusai 0.15.6__tar.gz → 0.15.8__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 (127) hide show
  1. {sonusai-0.15.6 → sonusai-0.15.8}/PKG-INFO +14 -18
  2. {sonusai-0.15.6 → sonusai-0.15.8}/README.rst +1 -1
  3. {sonusai-0.15.6 → sonusai-0.15.8}/pyproject.toml +14 -19
  4. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/generation.py +3 -3
  5. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth_functions/data.py +2 -0
  6. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth_functions/target.py +14 -6
  7. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/__init__.py +0 -0
  8. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/aawscd_probwrite.py +0 -0
  9. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/calc_metric_spenh.py +0 -0
  10. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/data/__init__.py +0 -0
  11. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/data/genmixdb.yml +0 -0
  12. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/data/speech_ma01_01.wav +0 -0
  13. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/data/whitenoise.wav +0 -0
  14. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/data_generator/__init__.py +0 -0
  15. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/data_generator/dataset_from_mixdb.py +0 -0
  16. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/data_generator/keras_from_mixdb.py +0 -0
  17. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/data_generator/torch_from_mixdb.py +0 -0
  18. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/doc/__init__.py +0 -0
  19. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/doc/doc.py +0 -0
  20. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/doc.py +0 -0
  21. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/evaluate.py +0 -0
  22. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/genft.py +0 -0
  23. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/genmix.py +0 -0
  24. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/genmixdb.py +0 -0
  25. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/gentcst.py +0 -0
  26. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/keras_onnx.py +0 -0
  27. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/keras_predict.py +0 -0
  28. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/keras_train.py +0 -0
  29. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/lsdb.py +0 -0
  30. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/main.py +0 -0
  31. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/__init__.py +0 -0
  32. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/calc_class_weights.py +0 -0
  33. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/calc_optimal_thresholds.py +0 -0
  34. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/calc_pcm.py +0 -0
  35. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/calc_pesq.py +0 -0
  36. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/calc_sa_sdr.py +0 -0
  37. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/calc_sample_weights.py +0 -0
  38. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/calc_wer.py +0 -0
  39. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/calc_wsdr.py +0 -0
  40. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/class_summary.py +0 -0
  41. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/confusion_matrix_summary.py +0 -0
  42. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/one_hot.py +0 -0
  43. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/metrics/snr_summary.py +0 -0
  44. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/__init__.py +0 -0
  45. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/audio.py +0 -0
  46. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/augmentation.py +0 -0
  47. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/class_count.py +0 -0
  48. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/config.py +0 -0
  49. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/constants.py +0 -0
  50. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/datatypes.py +0 -0
  51. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/eq_rule_is_valid.py +0 -0
  52. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/feature.py +0 -0
  53. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/helpers.py +0 -0
  54. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/log_duration_and_sizes.py +0 -0
  55. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/mapped_snr_f.py +0 -0
  56. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/mixdb.py +0 -0
  57. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/soundfile_audio.py +0 -0
  58. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/sox_audio.py +0 -0
  59. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/sox_augmentation.py +0 -0
  60. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/spectral_mask.py +0 -0
  61. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/target_class_balancing.py +0 -0
  62. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/targets.py +0 -0
  63. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/tokenized_shell_vars.py +0 -0
  64. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/torchaudio_audio.py +0 -0
  65. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/torchaudio_augmentation.py +0 -0
  66. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth.py +0 -0
  67. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth_functions/__init__.py +0 -0
  68. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth_functions/crm.py +0 -0
  69. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth_functions/energy.py +0 -0
  70. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth_functions/file.py +0 -0
  71. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth_functions/phoneme.py +0 -0
  72. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mixture/truth_functions/sed.py +0 -0
  73. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mkmanifest.py +0 -0
  74. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/mkwav.py +0 -0
  75. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/onnx_predict.py +0 -0
  76. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/plot.py +0 -0
  77. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/post_spenh_targetf.py +0 -0
  78. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/queries/__init__.py +0 -0
  79. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/queries/queries.py +0 -0
  80. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/torchl_onnx.py +0 -0
  81. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/torchl_predict.py +0 -0
  82. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/torchl_train.py +0 -0
  83. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/tplot.py +0 -0
  84. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/__init__.py +0 -0
  85. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asl_p56.py +0 -0
  86. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr.py +0 -0
  87. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_functions/__init__.py +0 -0
  88. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_functions/aaware_whisper.py +0 -0
  89. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_functions/aixplain_whisper.py +0 -0
  90. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_functions/data.py +0 -0
  91. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_functions/deepgram.py +0 -0
  92. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_functions/fastwhisper.py +0 -0
  93. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_functions/google.py +0 -0
  94. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_functions/whisper.py +0 -0
  95. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_manifest_functions/__init__.py +0 -0
  96. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_manifest_functions/data.py +0 -0
  97. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_manifest_functions/librispeech.py +0 -0
  98. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/asr_manifest_functions/vctk_noisy_speech.py +0 -0
  99. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/braced_glob.py +0 -0
  100. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/calculate_input_shape.py +0 -0
  101. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/convert_string_to_number.py +0 -0
  102. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/create_ts_name.py +0 -0
  103. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/dataclass_from_dict.py +0 -0
  104. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/db.py +0 -0
  105. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/energy_f.py +0 -0
  106. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/engineering_number.py +0 -0
  107. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/get_frames_per_batch.py +0 -0
  108. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/get_label_names.py +0 -0
  109. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/grouper.py +0 -0
  110. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/human_readable_size.py +0 -0
  111. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/keras_utils.py +0 -0
  112. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/max_text_width.py +0 -0
  113. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/numeric_conversion.py +0 -0
  114. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/onnx_utils.py +0 -0
  115. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/parallel.py +0 -0
  116. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/print_mixture_details.py +0 -0
  117. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/ranges.py +0 -0
  118. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/read_mixture_data.py +0 -0
  119. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/read_predict_data.py +0 -0
  120. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/reshape.py +0 -0
  121. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/seconds_to_hms.py +0 -0
  122. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/stacked_complex.py +0 -0
  123. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/stratified_shuffle_split.py +0 -0
  124. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/trim_docstring.py +0 -0
  125. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/wave.py +0 -0
  126. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/utils/yes_or_no.py +0 -0
  127. {sonusai-0.15.6 → sonusai-0.15.8}/sonusai/vars.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sonusai
3
- Version: 0.15.6
3
+ Version: 0.15.8
4
4
  Summary: Framework for building deep neural network models for sound, speech, and voice AI
5
5
  Home-page: https://aaware.com
6
6
  License: GPL-3.0-only
@@ -16,21 +16,21 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Requires-Dist: PyYAML (>=6.0.1,<7.0.0)
18
18
  Requires-Dist: aixplain (>=0.2.6,<0.3.0)
19
+ Requires-Dist: ctranslate2 (==4.1.0)
19
20
  Requires-Dist: dataclasses-json (>=0.6.1,<0.7.0)
20
21
  Requires-Dist: deepgram-sdk (>=3.0.0,<4.0.0)
21
22
  Requires-Dist: docopt (>=0.6.2,<0.7.0)
22
- Requires-Dist: faster-whisper (>=0.10.0,<0.11.0)
23
- Requires-Dist: ffmpeg (>=1.4,<2.0)
24
- Requires-Dist: greenlet (>=3.0.1,<4.0.0)
25
- Requires-Dist: grpcio (==1.60.0)
23
+ Requires-Dist: faster-whisper (>=1.0.1,<2.0.0)
24
+ Requires-Dist: h5py (>=3.11.0,<4.0.0)
26
25
  Requires-Dist: jiwer (>=3.0.3,<4.0.0)
27
- Requires-Dist: keras-tuner (>=1.4.5,<2.0.0)
26
+ Requires-Dist: keras (>=3.1.1,<4.0.0)
27
+ Requires-Dist: keras-tuner (>=1.4.7,<2.0.0)
28
28
  Requires-Dist: librosa (>=0.10.1,<0.11.0)
29
- Requires-Dist: lightning (>=2.1.0,<3.0.0)
29
+ Requires-Dist: lightning (>=2.2,<2.3)
30
30
  Requires-Dist: matplotlib (>=3.8.0,<4.0.0)
31
- Requires-Dist: onnx (==1.14.1)
31
+ Requires-Dist: onnx (>=1.14.1,<2.0.0)
32
32
  Requires-Dist: onnxruntime (>=1.16.1,<2.0.0)
33
- Requires-Dist: paho-mqtt (>=1.6.1,<2.0.0)
33
+ Requires-Dist: paho-mqtt (>=2.0.0,<3.0.0)
34
34
  Requires-Dist: pandas (>=2.1.1,<3.0.0)
35
35
  Requires-Dist: pesq (>=0.0.4,<0.0.5)
36
36
  Requires-Dist: pyaaware (>=1.5.3,<2.0.0)
@@ -38,18 +38,14 @@ Requires-Dist: pydub (>=0.25.1,<0.26.0)
38
38
  Requires-Dist: pystoi (>=0.4.0,<0.5.0)
39
39
  Requires-Dist: python-magic (>=0.4.27,<0.5.0)
40
40
  Requires-Dist: requests (>=2.31.0,<3.0.0)
41
- Requires-Dist: resampy (>=0.4.2,<0.5.0)
42
- Requires-Dist: samplerate (>=0.1.0,<0.2.0)
43
- Requires-Dist: scikit-learn (>=1.3.1,<2.0.0)
44
- Requires-Dist: sh (>=2.0.6,<3.0.0)
41
+ Requires-Dist: samplerate (>=0.2.1,<0.3.0)
45
42
  Requires-Dist: soundfile (>=0.12.1,<0.13.0)
46
43
  Requires-Dist: sox (>=1.4.1,<2.0.0)
47
- Requires-Dist: speechrecognition (>=3.10.0,<4.0.0)
44
+ Requires-Dist: speechrecognition (>=3.10.1,<4.0.0)
48
45
  Requires-Dist: tensorflow (>=2.15.0,<3.0.0)
49
- Requires-Dist: tensorflow-addons (>=0.23.0,<0.24.0)
50
46
  Requires-Dist: tf2onnx (>=1.15.1,<2.0.0)
51
- Requires-Dist: torch (>=2.1.0,<3.0.0)
52
- Requires-Dist: torchaudio (>=2.1.0,<3.0.0)
47
+ Requires-Dist: torch (>=2.2,<2.3)
48
+ Requires-Dist: torchaudio (>=2.2,<2.3)
53
49
  Requires-Dist: torchinfo (>=1.8.0,<2.0.0)
54
50
  Requires-Dist: tqdm (>=4.66.1,<5.0.0)
55
51
  Description-Content-Type: text/x-rst
@@ -59,7 +55,7 @@ Sonus AI: Framework for simplified creation of deep NN models for sound, speech,
59
55
  Sonus AI includes functions for pre-processing training and validation data and
60
56
  creating performance metrics reports for key types of Keras models:
61
57
  - recurrent, convolutional, or a combination (i.e. RCNNs)
62
- - binary, multiclass single-label, multiclass multi-label, and regresssion
58
+ - binary, multiclass single-label, multiclass multi-label, and regression
63
59
  - training with data augmentations: noise mixing, pitch and time stretch, etc.
64
60
 
65
61
  Sonus AI python functions are used by:
@@ -3,7 +3,7 @@ Sonus AI: Framework for simplified creation of deep NN models for sound, speech,
3
3
  Sonus AI includes functions for pre-processing training and validation data and
4
4
  creating performance metrics reports for key types of Keras models:
5
5
  - recurrent, convolutional, or a combination (i.e. RCNNs)
6
- - binary, multiclass single-label, multiclass multi-label, and regresssion
6
+ - binary, multiclass single-label, multiclass multi-label, and regression
7
7
  - training with data augmentations: noise mixing, pitch and time stretch, etc.
8
8
 
9
9
  Sonus AI python functions are used by:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "sonusai"
3
- version = "0.15.6"
3
+ version = "0.15.8"
4
4
  description = "Framework for building deep neural network models for sound, speech, and voice AI"
5
5
  authors = ["Chris Eddington <chris@aaware.com>", "Jason Calderwood <jason@aaware.com>"]
6
6
  maintainers = ["Chris Eddington <chris@aaware.com>", "Jason Calderwood <jason@aaware.com>"]
@@ -16,24 +16,23 @@ aawscd_probwrite = 'sonusai.aawscd_probwrite:main'
16
16
  [tool.poetry.dependencies]
17
17
  PyYAML = "^6.0.1"
18
18
  aixplain = "^0.2.6"
19
+ ctranslate2 = "4.1.0"
19
20
  dataclasses-json = "^0.6.1"
20
21
  deepgram-sdk = "^3.0.0"
21
22
  docopt = "^0.6.2"
22
- #einops = "^0"
23
- faster-whisper = "^0.10.0"
24
- ffmpeg = "^1.4"
25
- greenlet = "^3.0.1"
26
- grpcio = "1.60.0"
23
+ faster-whisper = "^1.0.1"
24
+ h5py = "^3.11.0"
27
25
  jiwer = "^3.0.3"
28
- keras-tuner = "^1.4.5"
26
+ keras = "^3.1.1"
27
+ keras-tuner = "^1.4.7"
29
28
  librosa = "^0.10.1"
30
- lightning = "^2.1.0"
29
+ lightning = "~2.2"
31
30
  matplotlib = "^3.8.0"
32
- onnx = "1.14.1"
31
+ onnx = "^1.14.1"
33
32
  #onnxruntime-gpu = "^1.16.1"
34
33
  onnxruntime = "^1.16.1"
35
34
  #openai-whisper = "^20231117"
36
- paho-mqtt = "^1.6.1"
35
+ paho-mqtt = "^2.0.0"
37
36
  pandas = "^2.1.1"
38
37
  pesq = "^0.0.4"
39
38
  pyaaware = "^1.5.3"
@@ -42,18 +41,14 @@ pystoi = "^0.4.0"
42
41
  python = ">=3.9,<3.12"
43
42
  python-magic = "^0.4.27"
44
43
  requests = "^2.31.0"
45
- resampy = "^0.4.2"
46
- samplerate = "^0.1.0"
47
- scikit-learn = "^1.3.1"
48
- sh = "^2.0.6"
44
+ samplerate = "^0.2.1"
49
45
  soundfile = "^0.12.1"
46
+ speechrecognition = "^3.10.1"
50
47
  sox = "^1.4.1"
51
- speechrecognition = "^3.10.0"
52
48
  tensorflow = "^2.15.0"
53
- tensorflow-addons = "^0.23.0"
54
49
  tf2onnx = "^1.15.1"
55
- torch = "^2.1.0"
56
- torchaudio = "^2.1.0"
50
+ torch = "~2.2"
51
+ torchaudio = "~2.2"
57
52
  torchinfo = "^1.8.0"
58
53
  tqdm = "^4.66.1"
59
54
 
@@ -63,7 +58,7 @@ ipython = "^8.16.1"
63
58
  jupyter = "^1.0.0"
64
59
  mypy = "^1.6.0"
65
60
  mypy-extensions = "^1.0.0"
66
- pytest = "^7.4.2"
61
+ pytest = "^8.1.1"
67
62
  types-pyyaml = "^6.0.12.12"
68
63
  types-requests = "^2.31.0.8"
69
64
  yappi = "^1.4.0"
@@ -433,7 +433,7 @@ def _initialize_targets_audio(mixdb: MixtureDatabase, mixture: Mixture) -> tuple
433
433
  # target_gain is used to back out the gain augmentation in order to return the target audio
434
434
  # to its normalized level when calculating truth (if needed).
435
435
  if target.augmentation.gain is not None:
436
- target.gain = round(10 ** (target.augmentation.gain / 20), ndigits=7)
436
+ target.gain = round(10 ** (target.augmentation.gain / 20), ndigits=5)
437
437
  else:
438
438
  target.gain = 1
439
439
 
@@ -507,8 +507,8 @@ def _initialize_mixture_gains(mixdb: MixtureDatabase,
507
507
  mixture.target_snr_gain *= gain_adjustment
508
508
  mixture.noise_snr_gain *= gain_adjustment
509
509
 
510
- mixture.target_snr_gain = round(mixture.target_snr_gain, ndigits=7)
511
- mixture.noise_snr_gain = round(mixture.noise_snr_gain, ndigits=7)
510
+ mixture.target_snr_gain = round(mixture.target_snr_gain, ndigits=5)
511
+ mixture.noise_snr_gain = round(mixture.noise_snr_gain, ndigits=5)
512
512
  return mixture
513
513
 
514
514
 
@@ -23,6 +23,8 @@ class Data:
23
23
  num_classes=config.num_classes,
24
24
  truth_mutex=config.mutex)
25
25
 
26
+ self.num_bands = fg.num_bands
27
+ self.ttype = fg.ftransform_ttype
26
28
  self.frame_size = fg.ftransform_R
27
29
 
28
30
  if len(target_audio) % self.frame_size != 0:
@@ -13,12 +13,13 @@ Calculates the true transform of the target using the STFT
13
13
  configuration defined by the feature. This will include a
14
14
  forward transform window if defined by the feature.
15
15
 
16
- Output shape: [:, 2 * bins] (stacked real, imag)
16
+ Output shape: [:, num_classes]
17
+ (target stacked real, imag; or real only for tdac-co)
17
18
  """
18
19
 
19
20
  from sonusai import SonusAIError
20
21
 
21
- if data.config.num_classes != 2 * data.target_fft.bins:
22
+ if data.config.num_classes != data.num_bands:
22
23
  raise SonusAIError(f'Invalid num_classes for target_f truth: {data.config.num_classes}')
23
24
 
24
25
  target_freq = _execute_fft(data.target_audio, data.target_fft, len(data.offsets))
@@ -28,6 +29,7 @@ Output shape: [:, 2 * bins] (stacked real, imag)
28
29
  frame_size=data.frame_size,
29
30
  zero_based_indices=data.zero_based_indices,
30
31
  bins=data.target_fft.bins,
32
+ ttype=data.ttype,
31
33
  start=0,
32
34
  truth=data.truth)
33
35
 
@@ -43,11 +45,13 @@ using the STFT configuration defined by the feature. This
43
45
  will include a forward transform window if defined by the
44
46
  feature.
45
47
 
46
- Output shape: [:, 4 * bins] (target stacked real, imag; mixture stacked real, imag)
48
+ Output shape: [:, 2 * num_classes]
49
+ (target stacked real, imag; or real only for tdac-co)
50
+ (mixture stacked real, imag; or real only for tdac-co)
47
51
  """
48
52
  from sonusai import SonusAIError
49
53
 
50
- if data.config.num_classes != 2 * data.target_fft.bins + 2 * data.mixture_fft.bins:
54
+ if data.config.num_classes != 2 * data.num_bands:
51
55
  raise SonusAIError(f'Invalid num_classes for target_mixture_f truth: {data.config.num_classes}')
52
56
 
53
57
  target_freq = _execute_fft(data.target_audio, data.target_fft, len(data.offsets))
@@ -59,6 +63,7 @@ Output shape: [:, 4 * bins] (target stacked real, imag; mixture stacked real, im
59
63
  frame_size=data.frame_size,
60
64
  zero_based_indices=data.zero_based_indices,
61
65
  bins=data.target_fft.bins,
66
+ ttype=data.ttype,
62
67
  start=0,
63
68
  truth=data.truth)
64
69
 
@@ -67,6 +72,7 @@ Output shape: [:, 4 * bins] (target stacked real, imag; mixture stacked real, im
67
72
  frame_size=data.frame_size,
68
73
  zero_based_indices=data.zero_based_indices,
69
74
  bins=data.target_fft.bins,
75
+ ttype=data.ttype,
70
76
  start=data.target_fft.bins * 2,
71
77
  truth=data.truth)
72
78
 
@@ -125,6 +131,7 @@ def _stack_real_imag(data: AudioF,
125
131
  frame_size: int,
126
132
  zero_based_indices: list[int],
127
133
  bins: int,
134
+ ttype: str,
128
135
  start: int,
129
136
  truth: Truth) -> Truth:
130
137
  import numpy as np
@@ -134,7 +141,8 @@ def _stack_real_imag(data: AudioF,
134
141
  b = _get_bin_slice(index + start, bins)
135
142
  truth[i, b] = np.real(data)
136
143
 
137
- b = _get_bin_slice(b.stop, bins)
138
- truth[i, b] = np.imag(data)
144
+ if ttype != 'tdac-co':
145
+ b = _get_bin_slice(b.stop, bins)
146
+ truth[i, b] = np.imag(data)
139
147
 
140
148
  return truth
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes