sonusai 0.18.4__py3-none-any.whl → 0.18.5__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.
- sonusai/mixture/mixdb.py +9 -7
- {sonusai-0.18.4.dist-info → sonusai-0.18.5.dist-info}/METADATA +1 -1
- {sonusai-0.18.4.dist-info → sonusai-0.18.5.dist-info}/RECORD +5 -5
- {sonusai-0.18.4.dist-info → sonusai-0.18.5.dist-info}/WHEEL +0 -0
- {sonusai-0.18.4.dist-info → sonusai-0.18.5.dist-info}/entry_points.txt +0 -0
sonusai/mixture/mixdb.py
CHANGED
@@ -1265,23 +1265,25 @@ class MixtureDatabase:
|
|
1265
1265
|
# Otherwise, generate data as needed
|
1266
1266
|
if m.startswith('mxwer'):
|
1267
1267
|
parts = m.split('.')
|
1268
|
-
if len(parts) !=
|
1268
|
+
if len(parts) != 2:
|
1269
1269
|
raise SonusAIError(
|
1270
|
-
f"Unrecognized '
|
1271
|
-
|
1272
|
-
|
1270
|
+
f"Unrecognized 'mxwer' format: '{m}'; must be of the form: 'mxwer.<name>'")
|
1271
|
+
asr_name = parts[1]
|
1272
|
+
asr_config = self.asr_configs.get(asr_name, None)
|
1273
|
+
if asr_config is None:
|
1274
|
+
raise SonusAIError(f"Unrecognized metric: '{m}'")
|
1273
1275
|
|
1274
|
-
if
|
1276
|
+
if self.mixture(m_id).snr < -96:
|
1275
1277
|
# noise only, ignore/reset target asr
|
1276
1278
|
return float('nan')
|
1277
1279
|
|
1278
1280
|
# ignore mixup
|
1279
1281
|
target_asr = self.mixture_speech_metadata(m_id, 'text')[0]
|
1280
1282
|
if target_asr is None:
|
1281
|
-
target_asr = calc_asr(target_audio(),
|
1283
|
+
target_asr = calc_asr(target_audio(), **asr_config).text
|
1282
1284
|
|
1283
1285
|
if target_asr:
|
1284
|
-
mixture_asr = calc_asr(mixture_audio(),
|
1286
|
+
mixture_asr = calc_asr(mixture_audio(), **asr_config).text
|
1285
1287
|
return calc_wer(mixture_asr, target_asr).wer * 100
|
1286
1288
|
|
1287
1289
|
# TODO: should this be NaN like above?
|
@@ -46,7 +46,7 @@ sonusai/mixture/feature.py,sha256=Rwuf82IoXzhHPGbKYVGcatImF_ssBf_FfvbqghVPXtg,41
|
|
46
46
|
sonusai/mixture/generation.py,sha256=W3n6ipI-dxg4Wj6YBJn8RTpFqkAyIXzxwObeFbSLq08,42801
|
47
47
|
sonusai/mixture/helpers.py,sha256=eC9ZysEa-83VLKen_9PKWzr8w9dkHj4lp6rMB2fNLbg,24759
|
48
48
|
sonusai/mixture/log_duration_and_sizes.py,sha256=baTUpqyM15wA125jo9E3posmVJUe3WlpksyO6v9Jul0,1347
|
49
|
-
sonusai/mixture/mixdb.py,sha256=
|
49
|
+
sonusai/mixture/mixdb.py,sha256=ItnjyLg0bVOnuQqQQWVOUSF3AHs95bvBLXjFFi6zQEc,57490
|
50
50
|
sonusai/mixture/soundfile_audio.py,sha256=BwO4lftNvrhoPTJERONcrpxSpM2fjO6kL_e5Ylz742A,4220
|
51
51
|
sonusai/mixture/sox_audio.py,sha256=Pu5RLE8lKKlGOzZsbfcVzbDvy7YPGBuGpbD_PxowFqA,12511
|
52
52
|
sonusai/mixture/sox_augmentation.py,sha256=kBWPrsFk0EBi71nLcKt5v0GA34bY7g9D9x0cEamNWbU,4564
|
@@ -119,7 +119,7 @@ sonusai/utils/stratified_shuffle_split.py,sha256=rJNXvBp-GxoKzH3OpL7k0ANSu5xMP2z
|
|
119
119
|
sonusai/utils/write_audio.py,sha256=ZsPGExwM86QHLLN2LOWekK2uAqf5pV_1oRW811p0QAI,840
|
120
120
|
sonusai/utils/yes_or_no.py,sha256=eMLXBVH0cEahiXY4W2KNORmwNQ-ba10eRtldh0y4NYg,263
|
121
121
|
sonusai/vars.py,sha256=m2AefF0m5bXWGXpJj8Pi42zWL2ydeEj7bkak3GrtMyM,940
|
122
|
-
sonusai-0.18.
|
123
|
-
sonusai-0.18.
|
124
|
-
sonusai-0.18.
|
125
|
-
sonusai-0.18.
|
122
|
+
sonusai-0.18.5.dist-info/METADATA,sha256=clPOU1dSbKMvviVaA2NxTWHXGf346J8t1EeQ5jOXVIU,2591
|
123
|
+
sonusai-0.18.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
124
|
+
sonusai-0.18.5.dist-info/entry_points.txt,sha256=zMNjEphEPO6B3cD1GNpit7z-yA9tUU5-j3W2v-UWstU,92
|
125
|
+
sonusai-0.18.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|