buzz/tests/transformers_transcriber_test.py
2025-12-18 20:49:39 +02:00

19 lines
555 B
Python

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