feat(voice): add isolated Local S2S v3 candidate and acceptance evidence
Extract the provider boundary while retaining OpenAI/Gemini contracts. Add an opt-in isolated Local S2S adapter, pinned engine extension, bounded component gateway and frozen effective configuration profiles. Enforce request token limits, zero retries, local asset validation, connection deadlines, disconnect ownership, bounded cleanup and signals. Include regression coverage, pinned source fixtures, operator guidance, asset fingerprints and guarded disposable PostgreSQL acceptance tooling. Preserve immutable fixture bytes across Git line-ending conversion. Validation recorded in the reports: - 74 repair, 107 combined and 242 preservation checks passed. - Fresh PostgreSQL local checks: 2 passed. - Expanded PostgreSQL: 57 passed, 6 documented baseline failures. - Compose configurations, staged whitespace and fixture hashes passed. Phase 1 live listening and Phase 2 complete engine/SDK/POSIX, real component audio and Persian browser acceptance remain pending. No operational switch, paid call, model download or Phase 3 implementation is included.
This commit is contained in:
@@ -102,6 +102,9 @@ def create_voice_session(req: CreateLiveSessionRequest, response: Response,
|
||||
response.status_code = 201 if result['status'] == 'connected' else 202
|
||||
response.headers['Idempotency-Replayed'] = 'true'
|
||||
return result
|
||||
if config.provider == 'local_s2s':
|
||||
from app.modules.voice.local_s2s import require_isolated_candidate
|
||||
require_isolated_candidate(config, IngestionSettings(), database_url=engine.url)
|
||||
cutoff = capability(config)
|
||||
profile = config.profile()
|
||||
# Construct configured embedding transport only after replay recovery.
|
||||
@@ -166,6 +169,9 @@ async def handle_stream_websocket(websocket, session_id, auth_service, lifecycle
|
||||
try:
|
||||
user = await blocking(auth_service.get_current_user, websocket.cookies.get(COOKIE_NAME))
|
||||
info = await blocking(lifecycle_service.validate_stream, user, session_id, initial=True)
|
||||
if config.provider == 'local_s2s':
|
||||
from app.modules.voice.local_s2s import require_isolated_candidate
|
||||
require_isolated_candidate(config, search_service.settings, database_url=engine.url)
|
||||
config.require_voice()
|
||||
if search_service.cutoff is None and not config.voice_transport_testing:
|
||||
raise ValueError('CALIBRATION_REQUIRED')
|
||||
|
||||
Reference in New Issue
Block a user