Commit Graph

109 Commits (mark-ii/qa)

Author SHA1 Message Date
Kris Gesling b8d2599fee Fix pycodestyle errors 2022-03-30 11:46:10 +09:30
Kris Gesling 4f52e2385f Fix Flake8 errors 2022-03-30 11:16:49 +09:30
Michael Hansen dcd42a1599 Use files for regex intents 2022-03-23 17:02:37 +00:00
Michael Hansen fd2ae74d02 Add regex intent service 2022-03-22 22:06:48 +00:00
Michael Hansen 59e5aef6e0 Use activity id as TTS session id 2022-03-17 19:25:17 +00:00
Michael Hansen 862176e4cc Use speech.cache event for TTS caching 2022-03-02 02:26:07 +00:00
Michael Hansen 391004d56c Allow TTS cache key to be explicitly set when using skill TTS cache functions. 2022-02-28 21:58:37 +00:00
Michael Hansen 1b780e8a5c Add TTS caching to skills and audio service 2022-02-22 22:04:14 +00:00
Chris Veilleux fe46a2705d add the logic for "template" resource files back in. 2022-02-17 19:00:28 -06:00
Chris Veilleux 5d6c88623d add regex file loading for skill into resources code 2022-02-16 16:22:44 -06:00
Chris Veilleux 7508d27a86 Merge remote-tracking branch 'origin/mark-ii/qa' into mark-ii/qa
# Conflicts:
#	mycroft/skills/mycroft_skill/mycroft_skill.py
2022-02-08 14:42:05 -06:00
Chris Veilleux 190ce2b500 another iteration of improving the resource file handling 2022-02-08 14:41:50 -06:00
ken-mycroft 16040224bd part of Jira MYC-1141 see also stop skill 2022-02-08 13:09:41 -05:00
Chris Veilleux a1a44f8bb8 update dialog renderer in the translator after all dialogs are loaded 2022-02-02 16:46:14 -06:00
Chris Veilleux b9f814a03c Move resource file location and translation logic into skill_data.py 2022-02-02 11:33:45 -06:00
ken-mycroft 8ce034d51b modifications to the stop process flow to accommodate upcoming commits to common play and query skills 2022-01-28 14:17:58 -05:00
Michael Hansen 9912c1a5bd Send TTS events with listen flag 2022-01-25 03:18:44 +00:00
Michael Hansen 5c07e59613 Use record_begin instead of wakeword
Always emit mycroft.mic.listen in get_response
2022-01-21 19:12:02 +00:00
Michael Hansen 235709d1e1 Occasional misses in start listening beep 2022-01-21 16:32:05 +00:00
Michael Hansen 7bec61c6ef Add play_sound_uri to skills 2022-01-21 16:25:59 +00:00
Chris Veilleux 19b96f88a3 Merge branch 'mark-ii/qa' of https://github.com/MycroftAI/mycroft-core into mark-ii/qa 2022-01-18 20:56:44 -06:00
Chris Veilleux 1d5cffcbd0 Add the concept of "skill service initializing" to skill loading so a skill can behave differently at service load time. 2022-01-18 20:56:26 -06:00
Michael Hansen a80c25e5cb Prototype activity started/ended functions for skills 2022-01-17 17:28:06 +00:00
Michael Hansen 942c836386 Send skill_id with speak event 2022-01-13 17:53:18 +00:00
Chris Veilleux efd5858616 Remove code that supported deprecated implementation of resting screen 2021-12-22 17:34:40 -06:00
Kris Gesling be45edb54f autoformat 2021-12-01 09:32:24 +09:30
Åke Forslund f709bb9a1e Use IntentServiceInterface in MycroftSkill.register_vocabulary()
This moves the message logic for adapt keyword registration into a single location.
2021-09-26 19:15:21 +02:00
Kris Gesling 4df863633d Merge dev pre-XDG into feature/mark-2
This includes all commits up to but not including PR #2794
2021-08-17 15:56:42 +09:30
Chris Veilleux 18cb28088d Added comments to document race condition 2021-07-06 13:48:52 -05:00
Kris Gesling 02faba9db8 fix indentation error 2021-06-17 15:25:23 +09:30
Kris Gesling aa83b9f7c0 Merge branch 'skill_control' into feature/mark-2
As requested.
2021-06-16 23:11:53 +09:30
Ken Smith ccd41717d2 respond to PR feedback 2021-05-18 13:08:09 -04:00
Ken Smith c8e16f99e8 add skill states and categories and enable barge in 2021-05-17 14:34:10 -04:00
Kris Gesling e75a05557b docstring cleanup 2021-05-11 15:10:32 +09:30
Kris Gesling 6327ac5dbb
Upgrade Lingua Franca to v0.4.1 (#2890)
**Update Lingua Franca to v0.4.1**

The update from Lingua Franca v0.2.x to v0.4.x includes few
breaking changes.
- Some API methods have been updated.
- Mycroft-core tests have been updated to reflect improvements in
  Lingua Franca's formatting and parsing.
- add LF default lang setting method to config.locale 
  including warning that this method will change in the future
- Add TODO's for 21.08 - moving more methods to LF
- simplify loading and setting default of languages in Skills service
- Remove unneeded wrappers for Lingua Franca functions
- Fix documentation of format and parse utils
- Fix test warnings
2021-05-08 08:34:02 +09:30
Kris Gesling 356288a38f
Merge pull request #2863 from forslund/feature/mycroft-bus-client
Utilize the mycroft-messagebus-client module
2021-03-31 21:22:31 +09:30
Åke Forslund 9acf5b7592 Utilize the mycroft-messagebus-client module
This utilizes the shared messagebus client implemented in the
mycroft-messagebus-client.
2021-03-22 06:31:50 +01:00
Kris Gesling cee879e7a4 Add exact optional param to voc_match
This adds the option to require an exact match of vocab. It sourced
from the Playback Control Skill.
2021-03-16 16:05:06 +09:30
Kris Gesling 0587c5d75e
Merge pull request #2856 from forslund/bugfix/stray-print
Remove stray print
2021-03-15 12:24:28 +09:30
Åke Forslund 29fd50324b Remove stray print 2021-03-14 09:32:45 +01:00
Kris Gesling ec00631c4b
Merge pull request #2813 from NeonAndrii/feature/issue-2812
Issue-2812 - Allow overridden converse methods to accept messages
2021-03-11 15:25:24 +09:30
Kris Gesling 3679eb1355
Merge pull request #2838 from forslund/test/get_response-tests
get response tests
2021-03-10 23:44:48 +09:30
neonandrii d69b61afb6 Issue-2812 - Allow overridden converse methods to accept messages - FIX: PEP8-line-too-long issue in MycroftSkill.converse - change required signature in MycroftSkill.converse(). 2021-02-23 14:44:12 +02:00
Åke Forslund 3a6ca30b33 Fix selecting last opt by number in ask_selection()
Fix off by one issue preventing the last option to be selected by
number.
2021-02-14 17:19:31 +01:00
Åke Forslund 7f3b4e1795 Add skill_api_method decorator
The api methods are now much easier to use, almost transparent. The
current caveat is that only "standarad" python types are acceptable
(int, float, str, list, bool, None) due to the json serialization.

- api methods are now created with the skill_api_method decorator
- both arguments and keyword arguments are sent to the api method
instead of the message object
- api methods now uses a normal return statement instead of having to
handle creating response messages on the bus.

For example if the datetime skill wants to make the datetime string
fetchable simply add the skill_api_method decorator to the
get_display_date method.

    @skill_api_method
    def get_display_date(self, day=None, location=None):
        """Returns the date and time as a string."""
        [...]

The methods return value will be sent back to the caller and can be used
from a skill through

        datetime = SkillApi.get('mycroft-date-time.mycroftai')
        self.log.info(datetime.get_display_date())
2021-02-06 17:57:19 +01:00
Åke Forslund df02bf22b4 Add skill api.
The skill api allows skills to define a public api which can easily be
accessed by other skills over the message bus just as easy as working
with a normal object.

The skill api object is generated from the skill's public_api property. It's a dict where each key is turned into a method on the api object. The method is defined as
  "api_method": {
    "type": message type string
    "func": handler method
    "help": help string for cli
  }

Example skill:

class Test2(MycroftSkill):
    def __init__(self):
        MycroftSkill.__init__(self)
        self.public_api = {
            'speak': {
                'type': 't2.speak',
                'func': self.handle_speak,
                'help': 'speak the test sentence\nand another line\n\nlast'
            },
            'speak2': {
                'type': 't2.speak2',
                'func': self.handle_speak2,
                'help': 'speak the other sentence'
            }
        }

    def handle_speak(self, message):
        self.speak('This is a test')
        self.bus.emit(message.response(data=None))

    def handle_speak2(self, message):
        self.speak('This is another test')
        self.bus.emit(message.response(data=None))
2021-02-06 17:55:34 +01:00
neonandrii fb84658e5d Issue-2812 - Allow overridden converse methods to accept messages - FIX: PEP8-line-too-long issue in MycroftSkill.converse 2021-01-26 19:27:33 +02:00
neonandrii 171b266ec1 Issue-2812 - Allow overridden converse methods to accept messages - modified the signature check in SkillManager.handle_converse_request and MycroftSkill.converse, and resolving PEP8 issues 2021-01-25 21:00:06 +02:00
neonandrii 416eebfee7 Issue-2812 - Allow overridden converse methods to accept messages - adding default message=None to MycroftSkill.converse and changing the signature check in the skill manager. 2021-01-22 17:16:22 +02:00
katridi a185a9a4bf
Issue-2567 - Fixing not initialized dialog_render (#2685)
Fixes #2567
2020-09-15 22:10:39 +09:30