From c885b0f37f51304bfc3a3ffb1bfd0392bb5c1cd1 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Fri, 30 Apr 2021 17:28:38 +0200 Subject: [PATCH] Fix tests with `speech_recognizer`. --- tests/test_pipelines_automatic_speech_recognition.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_pipelines_automatic_speech_recognition.py b/tests/test_pipelines_automatic_speech_recognition.py index c1f89ec5a36fe4..d9f37c64bf4ed9 100644 --- a/tests/test_pipelines_automatic_speech_recognition.py +++ b/tests/test_pipelines_automatic_speech_recognition.py @@ -40,7 +40,7 @@ def test_torch_small(self): framework="pt", ) waveform = np.zeros((34000,)) - output = nlp(waveform) + output = speech_recognizer(waveform) self.assertEqual(output, {"text": "C'est ce que j'ai fait à ce moment-là."}) @require_datasets @@ -56,14 +56,14 @@ def test_torch_large(self): framework="pt", ) waveform = np.zeros((34000,)) - output = nlp(waveform) + output = speech_recognizer(waveform) self.assertEqual(output, {"text": ""}) from datasets import load_dataset ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") filename = ds[0]["file"] - output = nlp(filename) + output = speech_recognizer(filename) self.assertEqual(output, {"text": "A MAN SAID TO THE UNIVERSE SIR I EXIST"}) @slow