Skip to content

Smarter fallback responses 3#296

Merged
Stypox merged 3 commits intomasterfrom
smarter-fallback-3
Mar 30, 2025
Merged

Smarter fallback responses 3#296
Stypox merged 3 commits intomasterfrom
smarter-fallback-3

Conversation

@Stypox
Copy link
Owner

@Stypox Stypox commented Feb 27, 2025

Another spin at #292 which is a bit better than my attempt in #295. As explained in #292:

Of course, it's possible that the speech that Dicio is hearing is not directed at it, so it doesn't make sense to retry indefinitely: if the user's second attempt is also something that Dicio can't understand, this implementation omits the "Could you repeat?" part of the response and stops re-enabling the microphone until the user successfully performs another interaction.

In order to make this possible, two architectural changes were needed:

  • Allowing the fallback skill to check if it was triggered on the previous execution, too. This can be done by adding a new field to SkillContext:
  • Communicating to SkillEvaluator that the microphone should be enabled again
    • in Smarter fallback responses #292 this was done by adding a getKeepListening() function to SkillOutput
    • in Smarter fallback responses 2 #295 there were no architectural changes, but the text fallback skill returned an unmatchable skill in getNextSkills(), which still made SkillEvaluator think the skill was requesting more output
    • in this PR SkillOutput.getNextSkills() is renamed to getInteractionPlan() with various options on how the interaction should continue (see the sealed class InteractionPlan), which also includes whether the microphone should be reenabled immediately or not

Fixes #280
Testing APK: https://github.com/Stypox/testing-apks/releases/download/12/app-debug.apk

Of course, it's possible that the speech that Dicio is hearing is not directed at it, so it doesn't make sense to retry indefinitely: if the user's second attempt is also something that Dicio can't understand, this implementation omits the "Could you repeat?" part of the response and stops re-enabling the microphone until the user successfully performs another interaction.
@Stypox Stypox changed the title Smarter text fallback: ask to repeat and trigger microphone Smarter fallback responses 3 Feb 27, 2025
This gives more flexibility and allows the skills to control the conversation flow better
This was referenced Feb 27, 2025
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.

When Dicio doesn't understand, and asks me to repeat, it should enable the mic again automatically

1 participant