diff --git a/python/paddle/audio/backends/backend.py b/python/paddle/audio/backends/backend.py index 80c29608ee1e52cbc26bead63e27eaacd666a220..86d15953af3f63dc3db50e61bb9206d3130d57ea 100644 --- a/python/paddle/audio/backends/backend.py +++ b/python/paddle/audio/backends/backend.py @@ -89,7 +89,7 @@ def load( Return: Tuple[paddle.Tensor, int]: (audio_content, sample rate) - Exampels: + Examples: .. code-block:: python import os diff --git a/python/paddle/tests/test_audio_backend.py b/python/paddle/tests/test_audio_backend.py index 2db722df43b6b1073cd4bf1b8d71be6a7b4504d7..3390ae9b8338d6c4962432256400979563ee9f35 100644 --- a/python/paddle/tests/test_audio_backend.py +++ b/python/paddle/tests/test_audio_backend.py @@ -86,13 +86,15 @@ class TestAudioBackends(unittest.TestCase): np.testing.assert_array_almost_equal(wav_data, waveform) current_backend = paddle.audio.backends.get_current_backend() - self.assertTrue(current_backend in ["wave_backend", "soundfile"]) + self.assertTrue( + current_backend in ["wave_backend", "soundfile", "sox_io"] + ) paddle.audio.backends.set_backend("wave_backend") backends = paddle.audio.backends.list_available_backends() for backend in backends: - self.assertTrue(backend in ["wave_backend", "soundfile"]) + self.assertTrue(backend in ["wave_backend", "soundfile", "sox_io"]) # Test error try: @@ -105,7 +107,9 @@ class TestAudioBackends(unittest.TestCase): backends = paddle.audio.backends.list_available_backends() for backend in backends: - self.assertTrue(backend in ["wave_backend", "soundfile"]) + self.assertTrue( + backend in ["wave_backend", "soundfile", "sox_io"] + ) current_backend = paddle.audio.backends.get_current_backend() self.assertTrue(current_backend, "wave_backend") paddleaudio.backends.set_audio_backend("soundfile")