Skip to content
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

jasper-dev: text-to-intent mapping #511

Open
wants to merge 3 commits into
base: jasper-dev
Choose a base branch
from

Conversation

andweber
Copy link

I've picked up the discussion from #504 and #361 with the implementation from
#134. Here's a first implementation intented for discussion.

Rationale

Jasper currently leaves it to the speechhandling plugins how they are extracting the intent from the phrase or keywords. Most plugins just use simple keyword searching. To improve Jasper this should be more sophisticated or at least be able to improve later one. Currently this is blocked because each plugins implements its own way and thus it can only be improved by improving the plugins.

I created a new plugin class named TTI (text-to-intent)-Mapping. The idea is to return from a given text what the user wanted to do. Thus making the "speechhandling plugins" to "action_plugins" implementing various actions linked to an intent definition. And the TTI as a translator between the transcribed text and the action.

This decouples the recognition of what the user wanted from the plugins, making this more generic and giving the possibility to improve this later on.

Changes

So far, basically I integrated the Phrasematcher from #134 into a plugin and made it available for the speechhandler plugins.

I created a new plugin class with intent that there might be other kinds of matching implementations later on and (with a config system for plugins) that plugin may choose which TTI they use.

I needed to divide the initialization of STT-Plugins into two steps to be able to pass mic and TTI to the speechhandling plugins during instance creation.

Example

Its the sample from #134: Have a look at test_phrasematcher.py.

Is this a way Jasper wants to go? I'm open for ideas, suggestions and discussion.

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