[模拟麦克风验收]:完成自动化语音闭环自测,包含模拟音频输入、两轮Pipeline验证和fixture回放
This commit is contained in:
@@ -207,6 +207,36 @@ models/
|
||||
16. Local speech provider test validates `OWNER_SPEECH_PROVIDER=local` does not construct cloud ASR/TTS providers.
|
||||
17. Partial filter test validates single-character and short transient results are not emitted.
|
||||
18. CTC STT loading test validates manifest type selects `from_zipformer2_ctc` and does not require transducer encoder/decoder/joiner files.
|
||||
19. Simulated microphone live acceptance validates the current `VoiceAssistantPipeline` with generated wake frames, formal question frames, noisy short partials, background speech, two repeated turns, session context, TTS playback, and standby recovery.
|
||||
20. Fixture replay test validates the generated simulated microphone JSONL can be written and replayed for deterministic debugging.
|
||||
|
||||
## Simulated Microphone Acceptance
|
||||
|
||||
`owner_voice_pet simulate-live` is a deterministic no-device acceptance runner. It does not replace `run-live` with a real microphone, but it closes the gap between small unit tests and human testing by feeding realistic ordered audio frames into the same live pipeline controller.
|
||||
|
||||
```text
|
||||
simulate-live
|
||||
-> generated AudioFrame sequence
|
||||
-> BoundedMemoryAudioTransport(simulated microphone)
|
||||
-> VoiceAssistantPipeline
|
||||
-> KeywordWakeWordProvider(metadata wake)
|
||||
-> SimulatedNoiseFilter(metadata + PCM passthrough)
|
||||
-> PrimarySpeakerVadRecorder
|
||||
-> MetadataSttProvider(partial + final)
|
||||
-> MockLlmProvider
|
||||
-> SineTtsProvider
|
||||
-> JSON checks
|
||||
```
|
||||
|
||||
The generated sequence intentionally contains:
|
||||
|
||||
1. one wake frame per turn;
|
||||
2. six primary speaker frames per question, enough to establish the temporary profile;
|
||||
3. short noisy partials `家` and `家确`, followed by stable question partials;
|
||||
4. fifteen background speech frames after the primary speaker stops, enough to trigger the 300 ms primary-speaker absence endpoint;
|
||||
5. a second wake/question sequence to prove recovery to standby and temporary context continuity.
|
||||
|
||||
The transport is bounded: if frames are exhausted unexpectedly, it raises a structured validation error instead of letting the pipeline loop forever. `--write-fixture` writes the exact simulated microphone frames as JSONL, and `--fixture` replays them for repeatable debugging.
|
||||
|
||||
## Migration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user