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

Fix stop vocab only working for common play usage #109

Closed
wants to merge 5 commits into from

Conversation

krisgesling
Copy link
Contributor

Description

An alternative to PR #108 - this adds Skill specific "stop" vocab that is only registered when the Skill is performing it's own local playback ie not through the Common Play Framework.

As the intent is only active while the News Skill is playing, it is quite liberal with it's matching at the moment.

This also calls audioservice.stop() to allow the VK tests to pass. Remaining @xfail's are caused by the Timer Skill matching on Stop utterances when it has no alarms set or expired.

I don't believe this local vocab is a long term solution but we first need better contextual awareness and a unified playback system.

Type of PR

  • Bugfix
  • Feature implementation
  • Refactor of code (without functional changes)
  • Documentation improvements
  • Test improvements

Testing

VK tests

ken-mycroft and others added 5 commits May 4, 2021 07:20
…requires a change to the common play framework
Message for converse debugging was logged every time the News Skill was active and an utterance was made. Hence converse wasn't confused, it is working as intended.
This isn't explicitly necessary to stop the audio playback however
it is how the current VK test steps verify that the audio has
stopped, and it shouldn't hurt.

Remaining @xfail tests are caused by the Timer Skill over-matching
Copy link

@ken-mycroft ken-mycroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the next PR I submit is heading. In many simple cases the converse() method is unnecessary and state transitions should be handled by the skill base class driven off a state/intent data structure. BTW, are you sure this works as expected? If you set an alarm for 2 minutes in the future and then play the news, when the alarm goes off while the news is playing and you say stop, does the news continue to play or does it stop also?

@krisgesling
Copy link
Contributor Author

Nope it does the current Mycroft standard behaviour of stopping everything. But if we're trying to stop the Alarm/Timer and not the news - shouldn't we use converse on those rather than this one?

@ken-mycroft
Copy link

Yea, that's why I figured we should hold off on this. I have a PR going in today which addresses the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants