File size: 396 Bytes
88e3f4a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import pytest
from omniff.models.asr import ASRModel
def test_asr_interface():
model = ASRModel(model_id="openai/whisper-large-v3", device="cpu")
assert not model.is_loaded
def test_asr_infer_not_loaded():
model = ASRModel(model_id="openai/whisper-large-v3", device="cpu")
with pytest.raises(RuntimeError, match="not loaded"):
model.infer({"audio_path": "test.wav"})
|