feat(voice): implement local S2S responsiveness candidate and direct TTS routing

Add local S2S responsiveness candidate pinning ASR options and sentence-at-a-time generation. Route speech synthesis directly to OpenAI API for fluent Persian phonetics with gpt-4o-mini-tts-2025-12-15. Add responsiveness, budget carry, and browser watch unit tests along with acceptance benchmarks and evaluation evidence.
This commit is contained in:
amirhosein mazaheri
2026-10-17 13:02:41 +03:30
parent a94b8cd3ea
commit 628aec8def
40 changed files with 1568 additions and 70 deletions
+2 -2
View File
@@ -50,12 +50,12 @@ def cleanup(runtime, guard, thread, stop, *, timeout=2, emit=print):
return any(counters.values())
def run_owned(build, key, request_timeout, *, startup_timeout=90, cleanup_timeout=2, emit=print):
def run_owned(build, key, request_timeout, *, startup_timeout=90, cleanup_timeout=2, emit=print, component_options=None):
stop, constructed, finished, abandoned, lock = Event(), Event(), Event(), Event(), Lock()
runtime = None
result = {}
with termination_signals(stop):
guard, thread = start_components(key, request_timeout)
guard, thread = start_components(key, request_timeout, **(component_options or {}))
def drive():
nonlocal runtime
if stop.is_set():