Commit Graph

4744 Commits (feature/tts-pause-resume)

Author SHA1 Message Date
Åke Forslund 29fd50324b Remove stray print 2021-03-14 09:32:45 +01:00
Chris Veilleux bf2670c890
Merge pull request #2853 from MycroftAI/feature/consolidate_tts_cache
Consolidate TTS cache logic
2021-03-11 16:25:19 -06:00
Kris Gesling bcf54f93c5
Merge branch 'dev' into upgrade/requests 2021-03-11 15:29:44 +09:30
Kris Gesling a399b19fd6
Merge pull request #2849 from forslund/refactor/clean-intent-service
Remove intent-service backwards compatibilities
2021-03-11 15:26:26 +09:30
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
Chris Veilleux ea013b26af Fixed failing unit test. 2021-03-10 21:16:34 -06:00
Chris Veilleux 62d277d612 Refactored to fix error where persistent cache directory was used when the temporary cache directory should have been. 2021-03-10 21:16:11 -06:00
Chris Veilleux 469b1d3458 Changed ordering of adding a file to cache to make more sense. 2021-03-10 15:55:21 -06:00
Chris Veilleux 86febca6a3 Fixed a bug passing None to an instance of Path 2021-03-10 15:35:38 -06:00
Chris Veilleux 5996fdbf08 Fixed a minor linting issue 2021-03-10 13:46:48 -06:00
Chris Veilleux 4d4f797c5d Add the stack trace to an error message to help with debugging. 2021-03-10 13:39:58 -06:00
Chris Veilleux 48e691a66f add deprecation warnings to the logic the new cache logic replaces. 2021-03-10 13:39:30 -06:00
Chris Veilleux 2f34df6603 enhance to use new cache logic 2021-03-10 13:39:01 -06:00
Chris Veilleux 5e90940896 new code to consolidate TTS cache handling into one module. 2021-03-10 13:38:17 -06:00
Kris Gesling 3679eb1355
Merge pull request #2838 from forslund/test/get_response-tests
get response tests
2021-03-10 23:44:48 +09:30
Kris Gesling f54300de38
Merge pull request #2844 from MycroftAI/bugfix/fake-blacklist
Remove example entries in blacklisted_skills config
2021-03-10 23:39:49 +09:30
Kris Gesling db79748faa
Merge pull request #2827 from MycroftAI/feature/converse-error-skill
add skill_id to converse error msg
2021-03-10 23:39:29 +09:30
Åke c1474814ad
Merge pull request #2841 from PureTryOut/dev-setup-virtual
dev_setup.sh: install Alpine deps to a virtual meta package
2021-03-08 06:04:22 +01:00
Åke Forslund 203e1fc740 Remove intent-service backwards compatibility
- Remove unused ContextManager import from mycroft.skills.intent_service
- Remove Old 'intent_failure' -> fallback handler
- Remove handling of fallback messages without the fallback_range
parameter
2021-03-07 12:59:59 +01:00
Kris Gesling 17dbaa2b38
Merge pull request #2840 from DiegoAsterio/bugfix/issue-2750
Issue-2750 - Remove log pollution
2021-03-03 15:25:21 +09:30
Åke 492bd22179
Merge pull request #2843 from OpenVoiceOS/fix/padatious_mess
Remove old Padatious class
2021-03-02 11:38:46 +01:00
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
Kris Gesling 38839a1489
Merge pull request #1822 from forslund/feature/skill-api
Feature/skill api
2021-02-23 10:03:17 +09:30
Kris Gesling bed4c9fe28 Remove example entries in blacklisted_skills config
The default mycroft.conf included some arbitrary examples in the
actual blacklisted_skills configuration. If a user attempted to
use a Skill that matched, it would be prevented from loading.
2021-02-22 16:07:31 +09:30
jarbasal 4200a38496 remove old padatious file 2021-02-18 17:19:28 +00:00
Bart Ribbers 934c289f03 dev_setup.sh: install Alpine deps to a virtual meta package
This allows easy uninstalling of the deps later on by just running "apk
del makedeps-mycroft-core"
2021-02-16 17:01:37 +01:00
Diego Asterio a00fe862d4 Merge branch 'bugfix/issue-2750' of https://github.com/DiegoAsterio/mycroft-core into bugfix/issue-2750 2021-02-15 13:42:14 +01:00
Diego Asterio 130d517f30 Issue-2750 - Remove log pollution
Add empty skill directories to a set and remove them whenever they are
no longer empty. Empty skill directories only appear once in the log.

==== Fixed Issues ====
log polution - #2750
2021-02-15 13:38:38 +01:00
Diego Asterio f39e71a6b7 Issue-2750 - Remove log pollution
Add empty skill directories to a set and remove them whenever they are
no longer empty. Empty skill directories only appear once in the log.

==== Fixed Issues ====
log polution - #2750
2021-02-15 13:01:34 +01: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 d724720b21 Basic tests for get_response based skill methods
- get_response
- ask_yesno
- ask_selection
2021-02-14 17:18:20 +01:00
Åke Forslund 53b9e87b21 Move AnyCallable to common location 2021-02-14 14:20:58 +01:00
devs-mycroft a976bd1094 Version bump from 20.8.0 to 20.8.1 2021-02-11 11:51:26 +00:00
Kris Gesling fa5576adf4
Merge pull request #2831 from MycroftAI/bugfix/google-voice
Upgrade gTTS to fix Google voice
2021-02-10 11:16:43 +09:30
Kris Gesling c8494932ac Remove deprecated Google TTS lang codes 2021-02-09 21:27:59 +09:30
Kris Gesling a287578883 upgrade gTTS to fix Google voice 2021-02-09 16:58:45 +09:30
Kris Gesling 36b2c41940
Merge pull request #2830 from forslund/tests/github-action-gcc
Use os default gcc in github workflow
2021-02-09 15:13:09 +09:30
Kris Gesling 57cb8dc4ff
Merge pull request #2829 from forslund/bugfix/fallback-to-mimic-config
Send correct conf to mimic when used as fallback
2021-02-09 15:08:55 +09:30
Åke Forslund 760ed1dcf5 Use os default gcc in github workflow 2021-02-08 23:48:23 +01:00
Åke Forslund dac3bb8f07 Use os default gcc in github workflow 2021-02-08 23:45:26 +01:00
Åke Forslund 9173e22460 Send correct conf to mimic when used as fallback
- Mimic is now sent the correct config when used as a fallback
- Tests updated to ensure this
2021-02-08 22:09:55 +01:00
Åke be2d3c9fb7
Merge pull request #2828 from MycroftAI/feature/mozilla-tts-validation
Add Mozilla TTS connection validation
2021-02-08 21:54:53 +01:00
Kris Gesling 5a19fc0716 Add Mozilla TTS connection validation
Replication of PR #2719
Original code from JarbasAl
2021-02-08 20:17:59 +09:30
Kris Gesling 5ca342621d add skill_id to error msg 2021-02-08 16:57:07 +09:30
Åke Forslund 56852594cc Add test cases for the SkillApi
- Tests for the MycroftSkill side implementation
- Tests for the generated SkillApi objects
2021-02-08 07:37:50 +01:00
Åke Forslund 1397659c77 Add skill api help to CLI 2021-02-06 17:57:38 +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
Kris Gesling bfd6be347f
Merge pull request #2690 from pixelherodev/dev
Add support for `doas`
2021-02-05 14:46:29 +09:30
Kris Gesling b1be522972
Merge pull request #2820 from MycroftAI/feature/gui-get
Feature/gui get
2021-02-05 14:41:03 +09:30