Skip to content

add trigger method to llm_kws #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged

Conversation

nyasu3w
Copy link

@nyasu3w nyasu3w commented Jun 4, 2025

Summary of Changes

Enable external JSON requests to llm_kws to simulate keyword detection (trigger keyword detection).

Why This Change

To enable conversation initiation through non-voice triggers (such as button presses).

What Was Done

Added a trigger() function to llm_kws and made it callable via RPC.

Changes Made

  • Added trigger() function
  • Added register_rpc_action() call in constructor

Impact Scope

llm_kws

Usage

Sending the following JSON will trigger the function:

{"request_id": "kws_command", "work_id": "kws.1001", "action": "trigger" } 

The work_id can change.

Notes

It appears that the function signatures differ between the main and dev branches. This implementation follows the dev branch convention.

@dianjixz dianjixz merged commit 2f63527 into m5stack:dev Jun 5, 2025
@nyasu3w nyasu3w deleted the pr/trigger_kws branch June 5, 2025 10:48
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.

2 participants