Commit Graph

3181 Commits (ffd58cb4ef6b6f69c552deb51efd433fe65f5f68)

Author SHA1 Message Date
ChristopherRogers1991 ffd58cb4ef Feature/common io t updates (#2050)
* Split ADJUST into ADJUST and SET

* Use enum names instead of values.

* Add properties to CommonIoTSkill

* property -> attribute to avoid conflict with builtin

* Add increase and decrease actions

* Fix copy/paste error
2019-03-13 22:51:54 -05:00
Matthew D. Scholefield 21c2849106
Merge pull request #2046 from forslund/bugfix/skill-tester-dialogs
Fix dialog check in skill tester
2019-03-13 09:58:52 -05:00
Åke 7cee77e5ee Remove skills directory link. (#2049) 2019-03-11 10:33:51 -05:00
Matthew D. Scholefield 5804dbbeae
Merge pull request #2040 from forslund/bugfix/tester-context
Fix context handling in skill tester
2019-03-09 13:08:22 -06:00
Åke Forslund a7a4853e58 Fix dialog check in skill tester
Merge consecutive .*'s into a single .*

The process for "{{modifier}} {{precip}} is expected on {{day}}" will first
replace the {{}} by .* as previously:

".* .* is expected on .*"

then a second pass is made replacing any consecutive .* resulting in

".* is expected on .*"
2019-03-09 09:25:29 +01:00
Åke 327511c937 Fix simple audio backend pausing by voice (#2045)
The restore_volume would previously unpause the service even if the user just asked for pausing playback.

This separates the paused flag from the pausing/resuming action so lowering/restoring volume doesn't affect the logical pausing state and can check it to determine if lowering/restoring is needed/wanted.
2019-03-08 02:24:58 -06:00
Åke 20ee4fddf0
Merge pull request #2044 from MycroftAI/feature/simple-audio-pausing
Add pause/resume to simple audio services
2019-03-08 08:46:51 +01:00
Steve Penrod dd25b76be6 Add pause/resume to simple audio services
This adds a very simple mechanism for pausing and resuming audio streams
that are actively playing.  The process is suspended and resumed when
requested.

This also uses that same method to implement lower_volume()/restore_volume() for simple "ducking" of audio.
2019-03-07 17:40:59 -06:00
Steve Penrod cd6db9f645 Bugfix for Mimic2 issues (#2043)
Mimic2 voices has several issues:
* Numeric generation was all goofed up for decimal numbers.  It was
  independently doing number to speech for the values before and after
  the period on a decimal number.  E.g. 1.100 became "one.one hundred".
  Removed local normalization altogether since it is handled
  correctly on the Mimic2 server now.
* Sentence splitting was being applied in the middle of things like
  numbers or abbreviations.  E.g. "I.B.M."
* Chunker algorithms were making unnecessary copies of string arrays

While in there I also:
* Removed several unused imports
* Cleaned up docstrings
* Prefixed private helpers with _
* Added debug logging of mimic2 request text
2019-03-07 14:55:31 -06:00
Åke 526d326ecf Mute the mic while playing the listening "beep" (#2042)
This also extends the stream mute to actually stopping the recording stream while muted.
2019-03-07 13:42:00 -06:00
Ruthvicp e6fa104fc4
Merge pull request #2041 from forslund/bugfix/dev_setup-locale-issue
Set a default locale when running dev_setup.sh
2019-03-06 12:39:24 -06:00
Åke Forslund 50e5df100a Set a default locale when running dev_setup.sh
System Localisation could break the maximum-used-cores calculation when mimic is built. This sets it to a default (C) locale ensuring a reliable run.
2019-03-06 16:39:22 +01:00
Åke Forslund 1602e74a3a Fix context handling 2019-03-06 14:28:12 +01:00
Matthew D. Scholefield a6de85a23c
Merge pull request #2036 from MycroftAI/feature/two-pass-padatious
Give Padatious high and low match passes
2019-03-06 01:40:26 -06:00
Steve Penrod 230c3057b4 Give Padatious high and low match passes
Padatious was accepting fairly low confidence matches (0.5).  This
would match a phrase such as "Where is the Empire State Building?" to the
intent "Where were you born?"  (Which is a 0.54 match)

Now there are two passes mad on the Padatious fallback.  The first is
looking for high confidence matches (> 0.8).  Then other fallbacks -- such
as the CommonQuery fallbacks -- have an opportunity to consume the
utterance.  If they don't consume it, Padatious is invoked again with
looser confidence before finally invoking the Unknown fallback.
2019-03-05 03:33:02 -06:00
Åke b47b578c1c
Merge pull request #2035 from MycroftAI/feature/ignore-skills
Ignore the 'skills' symlink
2019-03-05 08:06:30 +01:00
Steve Penrod cb9713a37e Ignore the 'skills' symlink
The .gitignore wasn't ignoring the symlink that would be created in
dev_setup.sh to point to /opt/mycroft/skills.  The gitignore treats
what looks like an absolute path "/skills" as relative to the
repo.
2019-03-04 14:42:54 -06:00
Andreas Lorensen 6c0cd8d427 Add danish 2 - initial work to get danish to core (#2033)
* Danish formatting and parsing functions
2019-03-04 21:40:12 +01:00
Åke 3f827f7faf
Merge pull request #2034 from adocampo/fix_format_es
Initial spanish format functions
2019-03-04 21:30:58 +01:00
Åke Forslund 5ba452e4b2 Rename and explain test of unhandled language code 2019-03-04 21:14:08 +01:00
Steve Penrod 1a63e69eb8 Remove symbolic link
No need to check in this symbolic link, it has nothing to do with the translation effort.
2019-03-04 15:37:44 +01:00
Angel Docampo fdeb66c3e4 Fixed pep8 issues 2019-03-04 15:37:28 +01:00
Angel Docampo 9c22ced394 Initial castillian format translations
This commit add the initial translations of core functions for format
numbers: nice_number_es, pronounce_number_es and nice_time_es.

==== Localization Notes ====
NONE - Castillian (Spain's spanish)
2019-03-04 15:37:10 +01:00
devs-mycroft 5f714957d4 Version bump from 19.2.-1 to 19.2.0 2019-02-28 23:32:21 +00:00
Åke 583fb7dbc2
Merge pull request #2031 from MycroftAI/feature/startup-feedback
Improve user feedback during startup
2019-02-28 22:47:31 +01:00
Steve Penrod 286fa6314f Imporove user feedback during startup
Now the eyes go to a khaki color and "< < < LOADING < < <" displays
during the skill startup.  When Padatious finishes the first training
we now emit a "mycroft.ready" on the messagebus.

A change to the skill_mark_1 to look for "mycroft.ready" instead of
"mycroft.skills.initialized" provides a good visual change to show that
it is ready for use.
2019-02-28 14:58:19 -06:00
Åke 5529acde12
Merge pull request #2030 from MycroftAI/bugfix/hide-warnings
Hide deprecated warning in certain cases
2019-02-28 21:12:17 +01:00
Steve Penrod f5025f5eaf Fix PEP8 2019-02-28 13:15:03 -06:00
Steve Penrod 419a8c531d Hide deprecated warning in certain cases
The deprecation warning was firing off at the load of every skill when
the decorators are being iterated through by internal code (which
includes the self.config with an @property).  Add check for these
special cases to not show a warning.
2019-02-28 13:11:07 -06:00
Åke 448bc3e8ab
Merge pull request #2029 from MycroftAI/bugfix/common-query-encolsure
Typo in Common Query 'encolsure'
2019-02-28 20:06:48 +01:00
Steve Penrod 603973ecf3 Typo in Common Query 'encolsure'
Fixed a type in the Common Query scoring system that broke a bonus check.
2019-02-28 12:39:38 -06:00
Åke 0c111bb60c
Merge pull request #2028 from MycroftAI/bugfix/inhibit-visemes
Activate/deactivate visemes on command
2019-02-28 16:53:38 +01:00
Åke Forslund 3d366013b9 Activate/deactivate visemes on command
When showing text the visemes would overwrite it. This inhibits the visemes when mouth events are turned off and reenables them when activated.
2019-02-28 16:04:43 +01:00
Åke b1123eade8
Merge pull request #2026 from MycroftAI/feature/tweak-common-play-scoring
Tweak CommonPlay scoring
2019-02-28 11:41:40 +01:00
Åke 85342080e5
Merge pull request #2027 from MycroftAI/feature/new-beep
More subtle "listening" sound
2019-02-28 11:18:21 +01:00
Steve Penrod df6a3700d9 More subtle "listening" sound 2019-02-28 04:16:58 -06:00
Steve Penrod d25d91e034 Tweak CommonPlay scoring
The scoring for CommonPlay would favor skills that responded with overly long
matches.  E.g. "Huey Lewis and the News" would be considered a better fit than
just "News" for the request "Play the News"
2019-02-28 11:06:52 +01:00
Steve Penrod d65555c327 Deprecate self.config in skills (#2025)
* Deprecate self.config in skills

Skills should contain their own settings, the self.config concept is being
deprecated.

Also removed the defaults set for several old MycroftAI skills.  The 19.02
version of these Skills initializes the default values using:
```python
self.settings["key"] = default
```

* Update padatious config to work with the config property.
2019-02-28 10:50:08 +01:00
Åke 07c2a93324 Feature/threaded emitter for real (#2024)
* Run emitter using threadpool

This moves the thread pool from the websocket client into the eventemitter allowing each registered function to run in a separate thread and not just each event.

This speeds up cases where there is a one to many call such as the common play framework and the upcomming common query framework.

* Add unit tests for threaded event emitter

* Add standard header

* Add standard header
2019-02-28 03:04:51 -06:00
ChristopherRogers1991 cf5d7b80c5 Feature/common io t (#2015)
* Add base common_iot_skill

* can_run takes IoTRequest

* Minor cleanup + documentation

* Fix pep8 issues

* Adjust scene and entity registration.

The controller skill is not guaranteed to be alive before
CommonIoTSkills, so we must call for values when it is alive, in
addition to accepting them at any time from other skills.

* Safer parsing

* Address PR feedback

* Add skill_id to register message

* Minor docstring edits
2019-02-28 01:31:03 -06:00
Åke ff6d7ed164
Merge pull request #2003 from MycroftAI/feature/19.02-versions
Update versions to 19.02
2019-02-28 08:19:30 +01:00
Ruthvicp ec7ed25ed5 date and time - for tonight, weekdays (#2023)
* date and time - for tonight, weekdays

* Updating the previous commit test_extractdatetime_en

* Editing comments for extract_date_time_en

* Generalized as a marker

Expanded this from just handling "weekends" to any day or plural of the day, "weekend", "weekday" or "weekdays".
2019-02-28 01:15:55 -06:00
Åke 4bacdeaee6 Let skill tester expand dialogs (#2007)
* Let skill tester expand dialogs

The skill tester need to expand the dialogs in the same way as the dialog renderer to be able to correctly assert the expected_dialog criteria.

* Minor docstring changes
2019-02-28 00:55:08 -06:00
Åke d3e6a10ecc GUI Remove pages/namespaces (#2002)
* Add remove page methods

* Implement SkillGUI.clear()

The method will now remove the namespace entirely from the gui.

This adds the message gui.clear.namespace

* Remove debug prints from SkillGUI

* Correcting docstring

* More docstring changes

* Remove whitespace added by Github webUI
2019-02-28 00:21:08 -06:00
Åke 8e495870c2 Feature/skill manager error checks (#1981)
* Attempt to create skill directory if not existing

* Handle missing priority skills

* Minor update of comments

* Handle skill load exception

Make sure an exception while trying to load/reload skill doesn't shutdown thread.

* Handle MsmException during SkillManager creation

If SkillManager can't be created due to an MsmException wait for network connection and retry.

* Update immediately if skill install file is missing

Missing skill install file indicates that this is a new venv and the requirements of the skills will need to be reinstalled.

* Add basic test for skill_manager

Basically only creating the skill_manager but it ensures that msm can be used on all supported python versions
2019-02-28 00:18:48 -06:00
Åke 6c14d7bc36 Refactor/19.02 removes (#2019)
* Remove the deprecated emitter

* Remove channels config key for listener

This has never been used.
2019-02-28 00:09:47 -06:00
Åke 11dae04451 Feature/threaded emitter (#2008)
* Update to pyee 5.0.0

- Update requirement
- Make the SkillSettings class hashable

* Update adapt to 0.3.2

* Upgrade websocket-client

* Remove special threading for common query
2019-02-27 23:41:52 -06:00
Åke 71088f8fcb Feature/update requirements (#1998)
* Update to pyee 5.0.0

- Update requirement
- Make the SkillSettings class hashable

* Update adapt to 0.3.2

* Upgrade websocket-client
2019-02-27 23:41:24 -06:00
Åke 6466659094
Merge pull request #1931 from triazo/dev
Use builtin cd for venv-activate.sh
2019-02-27 17:50:31 +01:00
Åke 8c757796e1
Merge pull request #2022 from forslund/feature/msm-0.7.3
Upgrade msm to 0.7.3
2019-02-27 12:57:38 +01:00