RhythmPauseRateExtractor#

Defined in: voxatlas.features.phonology.rhythm.pause_rate

class voxatlas.features.phonology.rhythm.pause_rate.RhythmPauseRateExtractor[source]#

Bases: BaseExtractor

Extract the phonology.rhythm.pause_rate feature within the VoxAtlas pipeline.

This public extractor defines the reusable API for computing phonology.rhythm.pause_rate from VoxAtlas structured inputs. It consumes syllable units and produces values aligned to ipu units, making the extractor a stable pipeline node that can be cited independently of the surrounding execution machinery.

Algorithm#

The extractor derives rhythm statistics from aligned syllables or phoneme-derived interval tables at the IPU level.

  1. Unit preparation Phoneme, syllable, and IPU tables are aligned so that each interval or syllable can be assigned to a speaking chunk.

  2. Metric computation Pause rate counts inter-syllabic gaps above threshold and normalizes by IPU duration,

    \[p_j = \frac{N_j^{\mathrm{pause}}}{T_j}.\]
  3. Packaging The result is aligned to ipu units so it can participate in later aggregation stages or conversation-level summaries.

Notes

This extractor declares the upstream dependencies [‘phonology.rhythm.intervals’] and is executed only after those features are available in the pipeline feature store.

Examples

>>> import pandas as pd
>>> from voxatlas.features.feature_input import FeatureInput
>>> from voxatlas.features.phonology.rhythm.pause_rate import RhythmPauseRateExtractor
>>> from voxatlas.units import Units
>>> syllables = pd.DataFrame({"id": [1, 2], "start": [0.0, 0.3], "end": [0.2, 0.5]})
>>> ipus = pd.DataFrame({"id": [5], "start": [0.0], "end": [1.0]})
>>> units = Units(syllables=syllables, ipus=ipus)
>>> params = RhythmPauseRateExtractor.default_config.copy()
>>> params["pause_threshold"] = 0.05
>>> out = RhythmPauseRateExtractor().compute(FeatureInput(audio=None, units=units, context={}), params)
>>> float(out.values.loc[5])
1.0
name: str = 'phonology.rhythm.pause_rate'#
input_units: str | None = 'syllable'#
output_units: str | None = 'ipu'#
dependencies: list[str] = ['phonology.rhythm.intervals']#
default_config: dict = {'pause_threshold': 0.05}#
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 FeatureInput bundle, 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 ipu unit level when applicable.

Return type:

FeatureOutput

Examples

>>> import pandas as pd
>>> from voxatlas.features.feature_input import FeatureInput
>>> from voxatlas.features.phonology.rhythm.pause_rate import RhythmPauseRateExtractor
>>> from voxatlas.units import Units
>>> syllables = pd.DataFrame({"id": [1], "start": [0.0], "end": [0.2]})
>>> ipus = pd.DataFrame({"id": [5], "start": [0.0], "end": [1.0]})
>>> units = Units(syllables=syllables, ipus=ipus)
>>> result = RhythmPauseRateExtractor().compute(FeatureInput(audio=None, units=units, context={}), {})
>>> result.unit
'ipu'