Add test suite — STT/TTS/wake-word boundaries with mock backends #6

Open
opened 2026-04-06 22:25:19 -07:00 by pyr0ball · 0 comments
Owner

Summary

Zero tests currently. Blocked on FastAPI migration (which makes the code testable with mock backends and dependency injection).

Once globals are replaced with injected instances, unit tests can mock STTBackend, TTSBackend, and WakeWordDetector protocols to test the HTTP layer independently of actual model inference.

Scope

  • HTTP endpoint tests (FastAPI TestClient)
  • Mock STT backend: returns fixed transcript
  • Mock TTS backend: returns empty bytes
  • Mock wake word: triggers callback programmatically
  • Integration test: audio upload → transcript → HA intent round trip (with mock HA)

References

  • cf-dev review finding: Priority 4
  • Depends on: FastAPI migration issue
## Summary Zero tests currently. Blocked on FastAPI migration (which makes the code testable with mock backends and dependency injection). Once globals are replaced with injected instances, unit tests can mock `STTBackend`, `TTSBackend`, and `WakeWordDetector` protocols to test the HTTP layer independently of actual model inference. ## Scope - HTTP endpoint tests (FastAPI TestClient) - Mock STT backend: returns fixed transcript - Mock TTS backend: returns empty bytes - Mock wake word: triggers callback programmatically - Integration test: audio upload → transcript → HA intent round trip (with mock HA) ## References - cf-dev review finding: Priority 4 - Depends on: FastAPI migration issue
pyr0ball added this to the Beta — Edge Wake Word milestone 2026-04-06 22:25:19 -07:00
pyr0ball added the
testing
label 2026-04-06 22:25:19 -07:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/minerva#6
No description provided.