Skip to content

Fix issue loading ASR pipelines#42970

Closed
pcuenca wants to merge 2 commits intomainfrom
asr-pipeline-feature-extractor
Closed

Fix issue loading ASR pipelines#42970
pcuenca wants to merge 2 commits intomainfrom
asr-pipeline-feature-extractor

Conversation

@pcuenca
Copy link
Copy Markdown
Member

@pcuenca pcuenca commented Dec 20, 2025

Introduced in #42806

Before this PR, the following failed:

from transformers import pipeline
pipe = pipeline("automatic-speech-recognition")

@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.

Copy link
Copy Markdown
Member

@zucchini-nlp zucchini-nlp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I forgot to check if _processor_class is used in other places. Not sure if the current fix works because feature extractor type is not the same as processor class. I also had a PR in #42920, just waiting for a review 😄

Comment on lines +992 to +995
feature_extractor_type = feature_extractor.to_dict().get("feature_extractor_type", None)
if (
feature_extractor._processor_class
and feature_extractor._processor_class.endswith("WithLM")
feature_extractor_type
and feature_extractor_type.endswith("WithLM")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the feature extractor is a simple Wav2Vec2FeatureExtractor so this might not work. I found only one processor with LM in hte codebase tbh

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was my question too, I wasn't sure how many cases would be impacted. Closing this in favor of yours then.

@pcuenca
Copy link
Copy Markdown
Member Author

pcuenca commented Dec 22, 2025

Closing in favor of #42920.

@pcuenca pcuenca closed this Dec 22, 2025
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