[真实全双工运行时]:完成run-agent-live可打断语音闭环,包含持续监听、软件回声抑制和播放取消验证
This commit is contained in:
+34
@@ -377,3 +377,37 @@ The full-duplex Agent architecture SHALL be testable with fake audio devices, fa
|
||||
#### Scenario: OpenSpec validation runs
|
||||
- **WHEN** this planning change is complete
|
||||
- **THEN** `openspec validate add-full-duplex-agent-voice-assistant --strict` and `openspec validate --all --strict` SHALL pass
|
||||
|
||||
### Requirement: Live run-agent-live runtime
|
||||
The system SHALL provide a real `run-agent-live` runtime entry point that starts continuous listening, handles user speech without a wake word, streams the assistant reply through interruptible playback, and returns to listening after completion or interruption.
|
||||
|
||||
#### Scenario: Agent live runtime starts
|
||||
- **WHEN** the user runs `.venv/bin/python -m owner_voice_pet run-agent-live`
|
||||
- **THEN** the command SHALL start the full-duplex Agent runtime instead of returning `FULL_DUPLEX_RUNTIME_NOT_IMPLEMENTED`
|
||||
|
||||
#### Scenario: Agent check-config remains diagnostic
|
||||
- **WHEN** the user runs `.venv/bin/python -m owner_voice_pet run-agent-live --check-config`
|
||||
- **THEN** the command SHALL validate and print non-secret full-duplex configuration without opening the microphone
|
||||
|
||||
#### Scenario: Legacy live runtime remains available
|
||||
- **WHEN** the user runs `.venv/bin/python -m owner_voice_pet run-live`
|
||||
- **THEN** the existing wake-word turn-based runtime SHALL remain available during migration
|
||||
|
||||
### Requirement: Software render-reference interruption gate
|
||||
The first live full-duplex runtime SHALL use software render-reference gating to prevent assistant playback from triggering user interruption while still stopping playback quickly when real user speech is detected.
|
||||
|
||||
#### Scenario: User interrupts assistant playback
|
||||
- **WHEN** valid user speech is detected during assistant playback and it is not classified as assistant render-reference echo
|
||||
- **THEN** playback SHALL stop at the next configured chunk boundary and the captured user frames SHALL be retained for the next STT pass
|
||||
|
||||
#### Scenario: STT partial is unavailable during interruption
|
||||
- **WHEN** VAD and render-reference gating indicate valid user speech but realtime STT has not produced a partial transcript yet
|
||||
- **THEN** the runtime SHALL still stop playback and SHALL use final STT on the buffered user audio afterward
|
||||
|
||||
#### Scenario: Assistant echo is present
|
||||
- **WHEN** microphone input during playback matches recent assistant render-reference audio and no user speech is present
|
||||
- **THEN** the runtime SHALL NOT emit `barge_in_detected` and SHALL continue playback
|
||||
|
||||
#### Scenario: Interrupted assistant text is committed
|
||||
- **WHEN** playback is stopped before a sentence is fully played
|
||||
- **THEN** only fully played assistant text SHALL be written to short-term context
|
||||
|
||||
Reference in New Issue
Block a user