Unverified Commit ee3be053 authored by LWprogramming's avatar LWprogramming Committed by GitHub
Browse files

Fix test typos - audio feature extractors (#23310)

parent 8f76dc8e
...@@ -114,8 +114,8 @@ class MCTCTFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.Te ...@@ -114,8 +114,8 @@ class MCTCTFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.Te
def test_call(self): def test_call(self):
# Tests that all call wrap to encode_plus and batch_encode_plus # Tests that all call wrap to encode_plus and batch_encode_plus
feature_extractor = self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()) feature_extractor = self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict())
# create three inputs of length 800, 1000, and 12000 # create three inputs of length 800, 1000, and 1200
speech_inputs = [floats_list((1, x))[0] for x in range(8000, 14000, 2000)] speech_inputs = [floats_list((1, x))[0] for x in range(800, 1400, 200)]
np_speech_inputs = [np.asarray(speech_input) for speech_input in speech_inputs] np_speech_inputs = [np.asarray(speech_input) for speech_input in speech_inputs]
# Test feature size # Test feature size
......
...@@ -255,8 +255,8 @@ class SpeechT5FeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest ...@@ -255,8 +255,8 @@ class SpeechT5FeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest
def test_call_target(self): def test_call_target(self):
# Tests that all call wrap to encode_plus and batch_encode_plus # Tests that all call wrap to encode_plus and batch_encode_plus
feature_extractor = self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()) feature_extractor = self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict())
# create three inputs of length 8000, 14000, and 2000 # create three inputs of length 800, 1000, and 1200
speech_inputs = [floats_list((1, x))[0] for x in range(8000, 14000, 2000)] speech_inputs = [floats_list((1, x))[0] for x in range(800, 1400, 200)]
np_speech_inputs = [np.asarray(speech_input) for speech_input in speech_inputs] np_speech_inputs = [np.asarray(speech_input) for speech_input in speech_inputs]
# Test feature size # Test feature size
......
...@@ -160,7 +160,7 @@ class TvltFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.Tes ...@@ -160,7 +160,7 @@ class TvltFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.Tes
feature_extractor = self.feature_extraction_class(**self.feat_extract_dict) feature_extractor = self.feature_extraction_class(**self.feat_extract_dict)
# create three inputs of length 800, 1000, and 1200 # create three inputs of length 800, 1000, and 1200
speech_inputs = [floats_list((1, x))[0] for x in range(8000, 14000, 20000)] speech_inputs = [floats_list((1, x))[0] for x in range(800, 1400, 200)]
np_speech_inputs = [np.asarray(speech_input) for speech_input in speech_inputs] np_speech_inputs = [np.asarray(speech_input) for speech_input in speech_inputs]
# Test not batched input # Test not batched input
......
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