validate_units#

Defined in: voxatlas.registry.validator

voxatlas.registry.validator.validate_units(input_units, output_units)[source]#

Validate units against VoxAtlas API rules.

This function supports the public feature registry contract used to discover, validate, and resolve extractor classes before execution.

Parameters:
  • input_units (object) – Source unit level consumed by the feature, or None when the extractor works directly from audio or global context.

  • output_units (object) – Target unit level produced by the feature, or None when the output is not aligned to a unit table.

Returns:

Return value produced by this API.

Return type:

object

Examples

>>> from voxatlas.registry.validator import validate_units
>>> validate_units(None, "conversation") is None
True
>>> validate_units("banana", "conversation")
Traceback (most recent call last):
...
ValueError: input_units must be one of ['conversation', 'frame', 'ipu', 'phoneme', 'sentence', 'syllable', 'token', 'turn', 'word'] or None