G7 증명과 G8 clean-head 승격 준비
This commit is contained in:
parent
94c681d450
commit
5221f79e3f
52 changed files with 6876 additions and 506 deletions
|
|
@ -16,6 +16,7 @@ from .persona_repository import PersonaVoiceMap
|
|||
from .routes import voice as voice_routes
|
||||
from .services import multimodal_alliance_store
|
||||
from .services.voice import (
|
||||
MELOTTS_TTS_MODEL,
|
||||
StreamingTranscriptEvent,
|
||||
TranscriptResult,
|
||||
TranscriptWord,
|
||||
|
|
@ -150,6 +151,27 @@ class _FakeRouteStreamingSession:
|
|||
self.aborted = True
|
||||
|
||||
|
||||
class VoiceHealthContractTest(unittest.IsolatedAsyncioTestCase):
|
||||
async def test_melotts_health_reports_the_operated_model(self) -> None:
|
||||
service = SimpleNamespace(
|
||||
is_available=lambda: True,
|
||||
stt_available=lambda: True,
|
||||
tts_available=lambda: True,
|
||||
tts_provider=lambda: "melotts",
|
||||
stt_provider=lambda: "local_whisper",
|
||||
stt_model=lambda: "small",
|
||||
batch_stt_available=lambda: False,
|
||||
)
|
||||
|
||||
with patch.object(voice_routes, "voice_service", service):
|
||||
response = await voice_routes.voice_health()
|
||||
|
||||
body = json.loads(bytes(response.body))
|
||||
self.assertEqual(body["status"], "ok")
|
||||
self.assertEqual(body["tts_provider"], "melotts")
|
||||
self.assertEqual(body["tts_model"], MELOTTS_TTS_MODEL)
|
||||
|
||||
|
||||
class VoiceWebSocketContractTest(unittest.IsolatedAsyncioTestCase):
|
||||
def _bind_result(self) -> tuple[str, VoicePreset, None, dict[str, object]]:
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue