File size: 364 Bytes
88e3f4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytest

from omniff.models.tts import TTSModel


def test_tts_interface():
    model = TTSModel(model_id="suno/bark-small")
    assert not model.is_loaded
    assert model.model_id == "suno/bark-small"


def test_tts_infer_not_loaded():
    model = TTSModel()
    with pytest.raises(RuntimeError, match="not loaded"):
        model.infer({"text": "hello"})