Skip to content

Add voice-command router (injectable speech-to-text)#252

Merged
JE-Chen merged 1 commit into
devfrom
feat/voice-router-batch
Jun 20, 2026
Merged

Add voice-command router (injectable speech-to-text)#252
JE-Chen merged 1 commit into
devfrom
feat/voice-router-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 20, 2026

Copy link
Copy Markdown
Member

Hands-free batch (approved under 批准全部). Full layers + tests + EN/Zh v44 docs + README.

Feature (utils/voice, pure-stdlib)

  • VoiceRouter: maps spoken trigger phrases to AC_* action lists; feed it recognized text and it runs the closest registered command. Phrase matching reuses the project's fuzzy matcher (Add fuzzy string matching and dedupe #248), so "save the file" fires a "save file" command despite recogniser noise.
  • Speech-to-text is out of scope and injectable: the router takes already-recognised text; a real mic/Vosk recogniser is a recognizer callable to listen_once, and the action runner is injectable too — so routing is fully unit-tested with no audio or speech dependency. The env-bound STT path stays outside the framework, honestly.
  • Executor AC_voice_register / AC_voice_dispatch / AC_voice_list / AC_voice_clear (actions as list or builder JSON string); MCP ac_voice_*; Builder under Agent.

Verification

  • 10 tests pass (register/replace/phrases, fuzzy match + below-threshold None, dispatch runs matched actions via injected runner, no-match runs nothing, listen_once uses recognizer, executor round-trip, wiring, facade); ruff clean; radon no CC≥C; bandit clean; PySide6-free.
  • Stacked on locale (Add locale-aware number/currency/date parsing #251); rebased cleanly onto dev.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 41 complexity · 0 duplication

Metric Results
Complexity 41
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit d8ad5f9 into dev Jun 20, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/voice-router-batch branch June 20, 2026 04:29
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant