[Whisper] Fix pipeline test (#27442)

This commit is contained in:
Sanchit Gandhi 2023-11-14 11:18:26 +00:00 committed by GitHub
parent b86c54d9ff
commit a4616c6767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -873,7 +873,7 @@ class AutomaticSpeechRecognitionPipelineTests(unittest.TestCase):
# 2. English-only Whisper does not accept the language argument
with self.assertRaisesRegex(
ValueError,
"Cannot specify `task` or `langauge` for an English-only model. If the model is intended to be multilingual, "
"Cannot specify `task` or `language` for an English-only model. If the model is intended to be multilingual, "
"pass `is_multilingual=True` to generate, or update the generation config.",
):
_ = speech_recognizer(filename, generate_kwargs={"language": "en"})