Xiaozhi WebSocket endpoint with handshake/auth, mock STT/TTS/Hermes backends, Thai chunker, barge-in queue, latency logger, GPU planner, voice-profile guard (reasoning=none, session_search only). CON-002: no GPU/audio libs loaded at import. MUST-NOT-001: all model names/tokens from config.
21 lines
362 B
Python
21 lines
362 B
Python
import asyncio
|
|
import json
|
|
|
|
import pytest
|
|
|
|
from app.config import Config
|
|
|
|
|
|
@pytest.fixture
|
|
def cfg() -> Config:
|
|
return Config.from_dict(
|
|
{
|
|
"security": {
|
|
"enabled": True,
|
|
"devices": [
|
|
{"device_id": "xiaozhi-main", "token_hash": "0" * 64}
|
|
],
|
|
}
|
|
}
|
|
)
|