DummyPitchExtractor#
Defined in: voxatlas.features.example_pitch
- class voxatlas.features.example_pitch.DummyPitchExtractor[source]#
Bases:
BaseExtractorExtract the
acoustic.pitch.dummyfeature within the VoxAtlas pipeline.This public extractor defines the reusable API for computing
acoustic.pitch.dummyfrom VoxAtlas structured inputs. It consumesNoneunits and produces values aligned toconversationunits, making the extractor a stable pipeline node that can be cited independently of the surrounding execution machinery.Algorithm#
The extractor follows the standard VoxAtlas feature-computation pattern.
Input preparation Structured audio, unit tables, and dependency outputs are gathered from
feature_input.Feature-specific computation The implementation applies the domain-specific transformation required by this extractor.
Packaging Results are aligned to
conversationunits and returned as aFeatureOutputobject.
Examples
>>> import numpy as np >>> from voxatlas.audio.audio import Audio >>> from voxatlas.features.example_pitch import DummyPitchExtractor >>> from voxatlas.features.feature_input import FeatureInput >>> audio = Audio(waveform=np.zeros(16000, dtype=np.float32), sample_rate=16000) >>> extractor = DummyPitchExtractor() >>> feature_input = FeatureInput(audio=audio, units=None, context={}) >>> output = extractor.compute(feature_input, {}) >>> output.feature 'acoustic.pitch.dummy'
- name: str = 'acoustic.pitch.dummy'#
- output_units: str | None = 'conversation'#
- 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
conversationunit level when applicable.- Return type:
FeatureOutput
Examples
>>> import numpy as np >>> from voxatlas.audio.audio import Audio >>> from voxatlas.features.example_pitch import DummyPitchExtractor >>> from voxatlas.features.feature_input import FeatureInput >>> audio = Audio(waveform=np.zeros(16000, dtype=np.float32), sample_rate=16000) >>> extractor = DummyPitchExtractor() >>> feature_input = FeatureInput(audio=audio, units=None, context={}) >>> result = extractor.compute(feature_input, {}) >>> float(result.values.iloc[0]) 0.0