mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 14:07:55 +00:00
27 lines
731 B
Python
27 lines
731 B
Python
"""Tests for speech configuration."""
|
|
|
|
from openjarvis.core.config import JarvisConfig, SpeechConfig
|
|
|
|
|
|
def test_speech_config_defaults():
|
|
cfg = SpeechConfig()
|
|
assert cfg.backend == "auto"
|
|
assert cfg.model == "base"
|
|
assert cfg.language == ""
|
|
assert cfg.device == "auto"
|
|
assert cfg.compute_type == "float16"
|
|
|
|
|
|
def test_jarvis_config_has_speech():
|
|
cfg = JarvisConfig()
|
|
assert hasattr(cfg, "speech")
|
|
assert isinstance(cfg.speech, SpeechConfig)
|
|
assert cfg.speech.backend == "auto"
|
|
|
|
|
|
def test_jarvis_system_has_speech_backend():
|
|
"""JarvisSystem has a speech_backend attribute."""
|
|
from openjarvis.system import JarvisSystem
|
|
|
|
assert "speech_backend" in JarvisSystem.__dataclass_fields__
|