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 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) != 3:
1268
+ if len(parts) != 2:
1269
1269
  raise SonusAIError(
1270
- f"Unrecognized 'mwwer' format: '{m}'; must be of the form: 'mxwer.<engine>.<model>'")
1271
- asr_engine = parts[1]
1272
- asr_model = parts[2]
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 asr_engine == 'none' or self.mixture(m_id).snr < -96:
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(), engine=asr_engine, whisper_model_name=asr_model).text
1283
+ target_asr = calc_asr(target_audio(), **asr_config).text
1282
1284
 
1283
1285
  if target_asr:
1284
- mixture_asr = calc_asr(mixture_audio(), engine=asr_engine, whisper_model_name=asr_model).text
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?
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sonusai
3
- Version: 0.18.4
3
+ Version: 0.18.5
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
@@ -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=dtEuF2S4wg8G5pl_lkfly5k0kAg_g9xMukVLdb4G8iY,57458
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.4.dist-info/METADATA,sha256=8Q0ANLLD6sjL_HJgqY3rrAEyj6m2emeOgPeraSjnUZ4,2591
123
- sonusai-0.18.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
124
- sonusai-0.18.4.dist-info/entry_points.txt,sha256=zMNjEphEPO6B3cD1GNpit7z-yA9tUU5-j3W2v-UWstU,92
125
- sonusai-0.18.4.dist-info/RECORD,,
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,,