Skip to content

🚨🚧 FeatureExtractor → AudioProcessor - #44394

Draft
eustlb wants to merge 70 commits into
mainfrom
audio-processor
Draft

🚨🚧 FeatureExtractor → AudioProcessor#44394
eustlb wants to merge 70 commits into
mainfrom
audio-processor

Conversation

@eustlb

@eustlb eustlb commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Models that have a feature_extractor_xxx and that should be addressed by this PR:

  • audio_spectrogram_transformer
  • clap
  • clvp
  • cohere_asr
  • dac
  • dia
  • encodec
  • gemma3n
  • granite_speech
  • kyutai_speech_to_text
  • lasr
  • musicgen_melody
  • parakeet
  • pe_audio
  • phi4_multimodal
  • pop2piano
  • seamless_m4t
  • speech_to_text
  • speecht5
  • univnet
  • vibevoice_acoustic_tokenizer
  • voxtral_realtime
  • wav2vec2
  • whisper

should cover

TODO

  • enforce that every model that has a AudioProcessorXx must have a test_audio_processing

@eustlb
eustlb force-pushed the audio-processor branch from 9ed713b to 32df5b0 Compare March 2, 2026 14:53
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@eustlb
eustlb changed the base branch from main to run_update_tiny_002 March 2, 2026 17:39
@eustlb
eustlb changed the base branch from run_update_tiny_002 to refactor-improc-backends March 2, 2026 17:48
@eustlb
eustlb force-pushed the audio-processor branch from 91174d1 to 69357b8 Compare March 2, 2026 18:03
@eustlb
eustlb changed the base branch from refactor-improc-backends to main May 12, 2026 13:45
eustlb added 29 commits July 23, 2026 16:52
…ackend-dicts

- format_args_docstring: unwrap the {feature_extractor_class} backend-dict (torch default),
  not just {image_processor_class} (regression from merged image-backend refactor #43514)
- MODALITY_TO_BASE_CLASS_MAPPING: accept Torch/NumpyAudioBackend for the feature_extractor
  and audio_processor slots so new XxxAudioProcessor classes pass ProcessorMixin validation
Add SpectrogramConfig.preemphasis_mode ('per_frame' default | 'waveform'). In 'waveform'
mode the base _stft applies preemphasis to the raw waveform (first sample unchanged) and
zeroes padded samples via audio_ranges, and preemphasis no longer forces manual framing.

Parakeet, Parakeet-numpy and Nemotron (inherits Parakeet) drop their _stft and
_needs_manual_framing overrides entirely; Cohere's _stft shrinks to just its dither.
Verified bit-identical output on all affected models; per-frame preemphasis models
(AST, seamless_m4t) unchanged. (ADR-0004 rule-of-two: pattern shared by 3 models.)
…gram

Superseded by audio_utils.py + audio_processing_backends.py (the 'temporarily use
separate backends files' iteration). No references anywhere in src/tests/docs/benchmarks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants