feat(voice): support evidence reuse, 120s output capacity, and input ASR coalescing
- Add internal reuse_last_evidence tool for continuing existing topic without repeated retrieval - Expand OpenAI output capacity to 120s / 5,760,000 bytes and add delivery fairness - Coalesce adjacent user ASR transcript deltas to prevent client control queue overflow - Add server-side OPENAI_REALTIME_SPEED configuration and update style to v4 - Add extensive unit and integration regressions for evidence reuse, capacity, and fairness
This commit is contained in:
@@ -287,10 +287,10 @@ def test_detected_forwarded_speech_overflow_without_commit(runner, persisted):
|
||||
try:
|
||||
await runtime.handle(dict(type="input_audio_buffer.speech_started",
|
||||
item_id="bounded", audio_start_ms=0))
|
||||
for _ in range(50):
|
||||
for _ in range(320):
|
||||
await runtime.input_audio(bytes(9600))
|
||||
await until(lambda: runtime.input_transport_count == 0)
|
||||
assert runtime.forwarded_buffer_bytes == 480000
|
||||
assert runtime.forwarded_buffer_bytes == 3072000
|
||||
await runtime.input_audio(bytes(2))
|
||||
assert runtime.failure == "LIVE_BUFFER_OVERFLOW"
|
||||
assert runtime.input_transport_bytes == runtime.input_buffer_bytes == 0
|
||||
@@ -485,7 +485,7 @@ def test_smoke_never_succeeds_from_early_transcript(runner, persisted, monkeypat
|
||||
await emit(event)
|
||||
return original_runtime(adapter, service, shared_runner, actor, gated, **kwargs)
|
||||
monkeypatch.setattr(voice_smoke, "VoiceRuntime", runtime_factory)
|
||||
config = SimpleNamespace(openai_api_key=SecretStr("not-a-key"),
|
||||
config = SimpleNamespace(provider='openai', openai_api_key=SecretStr("not-a-key"),
|
||||
openai_realtime_model="gpt-realtime-mini", openai_proxy=None)
|
||||
service = SimpleNamespace(engine=None, search=lambda *_: dict(status="no_evidence", sources=[]))
|
||||
task = asyncio.create_task(voice_smoke.run(service, runner, uuid4(), config, "q", 3, 4))
|
||||
|
||||
Reference in New Issue
Block a user