mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-30 19:02:16 +00:00
Add SpeechConfig dataclass with backend, model, language, device, and compute_type fields. Wire it into JarvisConfig and load_config() so [speech] TOML sections are loaded automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
516 B
Python
20 lines
516 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"
|