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:
amirhosein mazaheri
2026-10-15 12:28:17 +03:30
parent 872e5f25cb
commit 8d348f0ba1
56 changed files with 8802 additions and 44 deletions
+23
View File
@@ -145,3 +145,26 @@ INGEST_OCR_REVIEW_REQUIRED=true
OPENAI_REALTIME_MAX_OUTPUT_TOKENS=2048
# Provider-side speech speed (0.25..1.5); frozen for each new Live session.
OPENAI_REALTIME_SPEED=1.30
# Local S2S Phase 2 candidate (off by default; isolated development only).
# See services/local_s2s/README.md. Do not change the operational VOICE_PROVIDER.
LOCAL_S2S_ENABLED=false
LOCAL_S2S_ENDPOINT=ws://local-s2s-engine:8765/v1/realtime
LOCAL_S2S_ENGINE_REVISION=619e3fe4f71d1c6f35c15870d588a3638de34722
LOCAL_S2S_STT_MODEL=openai/whisper-large-v3
LOCAL_S2S_LLM_MODEL=openai/gpt-4.1-mini
# Candidate only: actual voice/rate/Persian compatibility is not accepted yet.
LOCAL_S2S_TTS_MODEL=google/gemini-3.8-flash-lite-tts
LOCAL_S2S_TTS_VOICE=Kore
LOCAL_S2S_MAX_OUTPUT_TOKENS=256
LOCAL_S2S_REQUEST_TIMEOUT_SECONDS=30
LOCAL_S2S_TOKEN=
# Engine-only OpenRouter key: set at launch, never forward it to the API/browser.
# OPENROUTER_API_KEY=
# Local engine v2: provision these local bundles separately, never at startup.
# Compose host paths (see services/local_s2s/README.md):
# LOCAL_S2S_VAD_SOURCE=<local-silero-source-and-jit-bundle>
# LOCAL_S2S_NLTK_SOURCE=<local-unpacked-nltk-data>
# LOCAL_S2S_ASSET_MANIFEST_SOURCE=<local-assets.json>
# LOCAL_S2S_ASSET_MANIFEST_SHA256=<reviewed-manifest-sha256>