A self-hosted, fully-async smart-speaker pipeline:
Mic → Wake Word (Porcupine) → STT (Whisper) → LLM (function-call JSON) → Home Assistant → TTS (VoiceVox)
※ HomeAssistant対応スマートスピーカー。Google Home では出来ない複合家電操作が狙いです。
| Status | Feature | Notes |
|---|---|---|
| ✅ | Wake-word detection (Porcupine) | Sample-rate-agnostic buffering with resample_poly |
| ⚙️ | Compound commands | e.g. “Turn off the AC and the lights.” |
| ⚙️ | Voice switching | Any VoiceVox character |
| 📝 | Actionable HA notifications | Planned (post-MVP) |
⚠️ This section has not been verified yet.
実機での動作はまだ未検証です。手順が変わる可能性があります。
git clone https://github.com/Karimera1696/SmartSpeaker2
cd SmartSpeaker2
cp .env.example .env # ← fill tokens later
poetry install --no-root
poetry run python -m smartspeaker2 --helpgraph LR
A["Mic<br/>(48 k / 44.1 k)"] -->|PCM| B["Wake / Porcupine"]
B -->|trigger| C["Whisper STT"]
C -->|text| D["OpenAI Chat<br/>function-call"]
D -->|JSON| E["MCP Client"]
E -->|service| HA["Home Assistant"]
D -->|response| F["VoiceVox TTS"]
F -->|audio| SPK["Speaker"]
- July : Async refactor & CI (ruff, mypy, pytest)
- Aug-Mid : MVP – end-to-end voice ⇄ voice, README video
- Aug-End : Docs & Test coverage ≥ 80 %
- Sep : Compound HA actions + HA notification PoC
- Oct : Portfolio polish / interview prep
# run all linters & tests
poetry run task ci
# run single test (async)
pytest -k wake -qWe follow Conventional Commits (feat, fix, docs, …).
Scopes map to top-level directories, e.g. feat(wake): add resample_poly buffering.