buzz/tests/transformers_whisper_test.py
2025-07-06 21:00:07 +03:00

19 lines
543 B
Python

import platform
import pytest
from buzz.transformers_whisper import TransformersWhisper
from tests.audio import test_audio_path
class TestTransformersWhisper:
@pytest.mark.skipif(
platform.system() == "Darwin",
reason="Not supported on Darwin",
)
def test_should_transcribe(self):
model = TransformersWhisper("openai/whisper-tiny")
result = model.transcribe(
audio=test_audio_path, language="fr", task="transcribe"
)
assert "Bienvenue dans Passrel" in result["text"]