diff --git a/tests/data/arabic-audio.wav b/tests/data/arabic-audio.wav new file mode 100644 index 000000000..3e8543c2d Binary files /dev/null and b/tests/data/arabic-audio.wav differ diff --git a/tests/e2e/test_whisper.py b/tests/e2e/test_whisper.py index 8ba119e72..41f26ecd1 100644 --- a/tests/e2e/test_whisper.py +++ b/tests/e2e/test_whisper.py @@ -46,3 +46,12 @@ def test_transcriptions(): assert len(transcription.text) > 0 # The transcription should not be empty assert len(transcription.text) < 500 # The transcription should not be too long + + +def test_translations(): + translation = client.audio.translations.create( + model="whisper", file=Path("tests/data/arabic-audio.wav") + ) + + assert len(translation.text) > 0 # The translation should not be empty + assert len(translation.text) < 500 # The translation should not be too long