ArticulatoryFeaturesExtractor#
Defined in: voxatlas.features.phonology.articulatory.features
- class voxatlas.features.phonology.articulatory.features.ArticulatoryFeaturesExtractor[source]#
Bases:
BaseExtractorExtract the
phonology.articulatory.featuresfeature within the VoxAtlas pipeline.This public extractor defines the reusable API for computing
phonology.articulatory.featuresfrom VoxAtlas structured inputs. It consumesphonemeunits and produces values aligned tophonemeunits, making the extractor a stable pipeline node that can be cited independently of the surrounding execution machinery.Algorithm#
The extractor maps phoneme labels to articulatory classes using the phonology resource tables bundled with VoxAtlas.
Resource lookup Each aligned phoneme label is normalized to IPA-like form and matched against the articulatory feature inventory.
Class projection The output is a binary or categorical indicator, typically representable as \(x_i = \mathbf{1}[\mathrm{phoneme}_i \in C]\) for a class \(C\) such as vowels, nasals, or plosives.
Packaging The resulting phoneme-aligned values can then be aggregated into rhythm or segmental summaries.
Examples
>>> import pandas as pd >>> from voxatlas.features.feature_input import FeatureInput >>> from voxatlas.features.phonology.articulatory.features import ArticulatoryFeaturesExtractor >>> from voxatlas.units import Units >>> phonemes = pd.DataFrame( ... {"id": [1, 2], "start": [0.0, 0.1], "end": [0.1, 0.2], "label": ["a", "p"]} ... ) >>> units = Units(phonemes=phonemes) >>> params = ArticulatoryFeaturesExtractor.default_config.copy() >>> out = ArticulatoryFeaturesExtractor().compute(FeatureInput(audio=None, units=units, context={}), params) >>> out.unit 'phoneme' >>> "vowel" in out.values.columns True
- name: str = 'phonology.articulatory.features'#
- input_units: str | None = 'phoneme'#
- output_units: str | None = 'phoneme'#
- dependencies: list[str] = []#
- default_config: dict = {'language': None, 'resource_root': None}#
- compute(feature_input, params)[source]#
Compute the extractor output for a single pipeline invocation.
This method is the reusable execution entry point for the extractor. It receives the standard
FeatureInputbundle, applies the configured algorithm, and returns feature values aligned to the extractor output units for storage in the pipeline feature store.- Parameters:
feature_input (object) – Structured extractor input bundling audio, hierarchical units, and execution context for this feature computation.
params (object) – Resolved feature configuration for this invocation. Keys are feature-specific and merged from defaults and pipeline settings.
- Returns:
Structured output aligned to the
phonemeunit level when applicable.- Return type:
FeatureOutput
Examples
>>> import pandas as pd >>> from voxatlas.features.feature_input import FeatureInput >>> from voxatlas.features.phonology.articulatory.features import ArticulatoryFeaturesExtractor >>> from voxatlas.units import Units >>> phonemes = pd.DataFrame({"id": [1], "start": [0.0], "end": [0.1], "label": ["a"]}) >>> units = Units(phonemes=phonemes) >>> params = ArticulatoryFeaturesExtractor.default_config.copy() >>> result = ArticulatoryFeaturesExtractor().compute(FeatureInput(audio=None, units=units, context={}), params) >>> result.values.shape[0] 1