fix test whisper with new max length (#19668)

This commit is contained in:
Arthur 2022-10-18 08:56:37 +02:00 committed by GitHub
parent d51ca32404
commit d356b89f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,7 +339,10 @@ class AutomaticSpeechRecognitionPipelineTests(unittest.TestCase, metaclass=Pipel
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
filename = ds[0]["file"]
output = speech_recognizer(filename)
self.assertEqual(output, {"text": " Mr. Quilter is the apostle of the middle classes, and we are glad to"})
self.assertEqual(
output,
{"text": " Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel."},
)
@slow
@require_torch