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:
@@ -36,6 +36,16 @@ def install_client_policy(base_module, config):
|
||||
native_setup = base.setup
|
||||
def setup(self, *args, **kwargs):
|
||||
kwargs['request_timeout_s'] = config.local_s2s_request_timeout_seconds
|
||||
if getattr(config, 'local_s2s_responsive', False):
|
||||
kwargs['stream_batch_sentences'] = 1
|
||||
return native_setup(self, *args, **kwargs)
|
||||
base.setup = setup
|
||||
return native
|
||||
|
||||
|
||||
def install_tts_speed(module, speed):
|
||||
native = module.OpenAICompatibleTTSHandler.setup
|
||||
def setup(self, *args, **kwargs):
|
||||
kwargs['speed'] = speed
|
||||
return native(self, *args, **kwargs)
|
||||
module.OpenAICompatibleTTSHandler.setup = setup
|
||||
|
||||
Reference in New Issue
Block a user