Unverified Commit 881fa716 authored by bofeng huang's avatar bofeng huang Committed by GitHub
Browse files

Fix error message in `WhisperFeatureExtractor` (#20936)

* Fix error message

* Fix code quality
parent 491a33d1
......@@ -271,9 +271,9 @@ class WhisperFeatureExtractor(SequenceFeatureExtractor):
if sampling_rate is not None:
if sampling_rate != self.sampling_rate:
raise ValueError(
f"The model corresponding to this feature extractor: {self} was trained using a sampling rate of"
f" {self.sampling_rate}. Please make sure that the provided `raw_speech` input was sampled with"
f" {self.sampling_rate} and not {sampling_rate}."
f"The model corresponding to this feature extractor: {self.__class__.__name__} was trained using a"
f" sampling rate of {self.sampling_rate}. Please make sure that the provided `raw_speech` input"
f" was sampled with {self.sampling_rate} and not {sampling_rate}."
)
else:
logger.warning(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment