Commit Graph

3017 Commits (a76c3a6e7a0bc8551437766a381307ae06c3ddae)

Author SHA1 Message Date
Åke 506d7ed843 Add locking when accessing the IdentityManager (#1801)
Adds the mycroft.util.combo_lock ComboLock class for interprocess/Thread
lock.

Loading updated to be more reliable:
- Flush and sync file
- wait 1.2 seconds before load

Split the logic from the locking so the lock can be avoided when calling
update from save or load from get.
2018-09-28 01:26:33 -05:00
devs-mycroft 5a5f2aa33d Version bump from 18.8.1 to 18.8.2 2018-09-27 19:24:07 +00:00
Steve Penrod a0eee8862b Use the phonetic_spellings.txt in Mimic2
The "phonetic_spellings.txt" mechanism converts odd words to strings that
represent what they should sound like when spoken.  For example, "mycroftai"
to "Mycroft A.I.".  This provides an easy mechanism to provide hints to
lots of Text to Speech engines.

This adds it to Mimic2, along with a spelling of "corgi".
2018-09-26 23:54:23 -05:00
Åke 2e7179d661 Strip trailing blank lines (#1817)
If a blank line is intended add a single space and it will be included
2018-09-26 22:22:00 -05:00
Steve Penrod 3843f5a657 Add "wait" option to MycroftSkill.speak() and speak_dialog() (#1812)
* Add "wait" option to MycroftSkill.speak() and speak_dialog()

The new "wait" option will cause the speak function to block until all
of the given dialog has been spoken by Mycroft.  This means:
    self.speak("Hello world", wait=True)
is now equivalent to:
    self.speak("Hello world")
    wait_while_speaking()
2018-09-26 22:02:56 +02:00
Steve Penrod 4a8e0e9f4a Add ability to schedule event in seconds (#1813)
* Add ability to schedule event in seconds

The MycroftSkill.schedule_event() method now accepts an integer in addition to
a datetime for the 'when' parameter.  The integer represents the number of
seconds in the future to fire off the event.  E.g.
```python
   self.schedule_event(some_handler, 7)
```
Will invoke some_handler() seven seconds from now.

Also unified language used in event docstrings.
2018-09-26 21:35:14 +02:00
jarbasal 0eb397f0db unittest 2018-09-26 20:22:23 +01:00
Åke 81f174be6f
Merge pull request #1816 from MycroftAI/feature/order-translation-value
Order results from translate_namedvalues()
2018-09-26 21:17:09 +02:00
jarbasal f1e8f6922c remove context methods 2018-09-26 20:10:34 +01:00
jarbasal 20b87eeac3 pep8 2018-09-26 19:27:05 +01:00
Steve Penrod fb03ac6cec Order results from translate_namedvalues()
Switch to an OrderedDict() for translate_namedvalues(), maintaining the
sequence of values defined in the original "list.value" file.  This is
useful in circumstances where there are multiple values, but the order
of listing indicates some sort of preference.

This is used in the Alarm skill to allow synonyms like "weekdays"/"weekday",
"Mondays/Monday", but the first value is used when building the status string.
For example "You have an alarm for 8am on Mondays".  Generically, this lets
translators consistently provide preferred names for values by adjusting the
order.
2018-09-26 13:26:56 -05:00
jarbasal efd184fd19 word arg is optional 2018-09-26 19:25:25 +01:00
Åke 52692a0e92
Merge pull request #1811 from MycroftAI/bugfix/now-utc
Fix now_utc() to return aware datetime
2018-09-26 20:23:58 +02:00
jarbasal d9b946a22f allow adapt context across skills 2018-09-26 19:18:08 +01:00
Åke 36bfdaba2b
Merge pull request #1810 from MycroftAI/feature/auto-try-precise
Check for a Precise model automatically for custom wake words
2018-09-26 19:09:54 +02:00
Steve Penrod 04745c9c40
Fix now_utc() to return aware datetime
The mycroft.util.time.now_utc() was returning a naive datetime object, potentially causing
issues in skills running on instances that aren't using UTC system-wide.  This didn't impact
Picroft or Mark 1, but Github installs would experience issues with skills such as the Alarm.
2018-09-26 12:04:32 -05:00
Matthew Scholefield a29d00707d Check for a Precise model automatically for custom wake words 2018-09-26 11:14:15 -05:00
Åke 00ef2740e7
Merge pull request #1809 from forslund/bugfix/test-setup
Fix test_setup issue in discover_test.py
2018-09-26 10:32:51 +02:00
Åke Forslund 8a77892821 Fix test_setup issue in discover_test.py 2018-09-26 09:58:52 +02:00
Matthew D. Scholefield 3d201b3ba3
Merge pull request #1800 from forslund/feature/clean-requirements
Update requirements and pip install
2018-09-25 17:30:35 -05:00
Matthew D. Scholefield bc4dfedec6
Merge branch 'dev' into feature/clean-requirements 2018-09-25 17:30:16 -05:00
Michael Nguyen 881de18db4
Merge pull request #1786 from forslund/test/test-setup
Test/test setup
2018-09-25 11:40:56 -05:00
Åke 924e6f56bd
Merge pull request #1808 from MycroftAI/feature/datetime-cleanup
Extract_datetime cleanup
2018-09-25 06:56:50 +02:00
Steve Penrod 3c94435f0e Extract_datetime cleanup
Cleaned up a few things noticed during review of Spanish extract_datetime_es() implementation.
2018-09-24 15:59:28 -05:00
Åke 1ad41ef5ec Workaround for adapt issue with context + one_of (#1789)
Adapt doesn't populate the entry from the one_of correctly from context. To work around the issue intent structure is scanned for empty keys and tries to populate them from entities in __tags__
2018-09-24 15:17:13 -05:00
Åke f091f44c85 Audioservice repeat (#1805)
* Add repeat option to audioservice

The audioservice.play() method now accepts a repeat parameter. If this
parameter is True the playlist passed to the audio service will be
repeated.

* Add repeat support to vlc

* Add the repeat parameter to all services

Not functional but playback will work at least. Hacktoberfest?
2018-09-24 15:12:12 -05:00
Michael Nguyen dbff88c7c2
Merge pull request #1806 from forslund/bugfix/gtts_token
Update gTTS-token module to fix google tts
2018-09-24 12:59:35 -05:00
Åke 20f0f85e74
Merge pull request #1807 from MycroftAI/pyyaml-version-bump
pyyaml fix for Arch and Manjaro builds
2018-09-24 19:26:24 +02:00
Kathy Reid cd6840671b
pyyaml fix for Arch and Manjaro builds
All credit to @adocampo who validated this fix on Arch/Manjaro. 
I have built 18.8.1 on Ubuntu 18.04 LTS and it works perfectly with `pyyaml 3.13`
This fix should help those using Arch and derivatives like Manjaro.
2018-09-25 03:11:10 +10:00
Åke Forslund 39882f9b6a Update gTTS-token module to fix google tts
Bumping the gTTS-token module version to 1.1.2
2018-09-24 13:15:37 +02:00
Angel Docampo f2c033f1f7 added functions for the spanish parser (#1571)
Added functions for the spanish parser

* Added spanish function calls in parser.py for extractnumber_es
and extract_datetime_es
* Added spanish functions in util/paser_es.py for extractnumber_es
extract_datetime_es and added some missing numbers

Merged in changes from #1804
2018-09-24 05:06:29 -05:00
Åke 92b04b36b1 Fix incorrect escape sequences found by skill test (#1797)
One occurence in dialog/__init__.py and one in skill_tester.py
2018-09-24 03:09:44 -05:00
Åke 25ccc3bed7 Feature/extract datetime update (#1804)
* Fix ambiguous time handling
  In certain cases the ambiguous time handling skipped a day forward. This updates the logic to handle a bit better.
* Adds a test for the ambiguous time
* Remove references to timeStr
   timeStr was never set and the logic that used it would never activate.
* Remove rename of currentDate
* Add extract_datetime parameter default_time
   If a time is not found in the input string the time will be set from the
   datetime/time object passed in as the default_time argument. If None the
   time will be Midnight as previously.
2018-09-24 03:08:39 -05:00
Åke 27d78c6530
Merge pull request #1799 from MycroftAI/opensuse-update
Update packages for OpenSuse
2018-09-24 09:57:51 +02:00
Åke af1023e7a5
Merge branch 'dev' into opensuse-update 2018-09-24 09:38:59 +02:00
Steve Penrod ee685088d5
Update Arch (pacman) install for Python 3 (#1798)
Installation under Arch Linux wasn't working for many because the dependencies
hadn't been updated for Python 3.  Mycroft would only work if all of the needed
components were already installed on the user's system.

Thanks to community member Chowbok for the help straightening this out!
2018-09-18 14:39:21 -05:00
Åke Forslund 923ea9f532 Install the set pip version direct.
use get_pip.py to install the specific version of pip instead of using easy_install
2018-09-17 19:59:41 +02:00
Åke Forslund 8547852d59 replace python-coveralls with coveralls
python-coveralls has a minor conflict with pytest, the newer coveralls package resolves this.
2018-09-17 18:57:43 +02:00
Åke Forslund ea0ca8cfbd Remove backwards compatibility modules
backports.ssl_match_hostname, futures and future are no longer needed.
2018-09-17 18:50:08 +02:00
Åke Forslund 8167d79ed8 Update packages for OpenSuse
This installs dependencies needed for running the latest version of
mycroft-core on OpenSuse
2018-09-16 15:12:48 +02:00
Åke Forslund 7cfd7ea019 Add info when skill fails to load during test
The skill log is redirected to a string during loading and if the skill
fails to load the loading logs are outputed when the first test for the
skill is executed.
2018-09-14 14:01:46 +02:00
Matthew D. Scholefield bd6f9ffde1
Merge pull request #1794 from forslund/feature/update-padaos
Update padaos to 0.1.7
2018-09-13 14:30:52 -05:00
devs-mycroft f19ae33c0b Version bump from 18.8.0 to 18.8.1 2018-09-13 10:51:05 +00:00
Åke 530701cb9a Allow multiple dialogs and responses (#1791)
Allowing multiple dialog choices can help in cases where a skill has a number of dialog files that each can be triggered independently by the same intent.  For example, the weather skill inquiry "will it rain" can trigger either a response when there is an upcoming rain and another if there's no rain in the near future.
```
"expected_dialog": ["dialog1", "dialog2"]
```
and
```
"expected_response": ["text 1", "text 2"]
```
is now possible. This will pass the test if a line from either dialog1 or dialog2 is matched. (or "text 1" or "text 2" is matched for "expected_response")
2018-09-12 18:16:27 -05:00
Michael Nguyen af9bbb07df
Merge pull request #1795 from MycroftAI/feature/mimic_tts_longer_sequences
longer sequence generation for mimic2 service
2018-09-12 16:23:29 -05:00
Michael Nguyen 1d472df803 fix commenting 2018-09-12 16:00:53 -05:00
Michael Nguyen 09a785364f remove unecessary log 2018-09-12 13:50:32 -05:00
Michael Nguyen 402b02b7fa added doc string and removed danerous default arg 2018-09-12 13:49:16 -05:00
Åke Forslund 5e42563183 Update padaos to 0.1.7
This improves the compatibility with python 3.7
2018-09-12 17:31:36 +02:00
Åke 5c25af000c Fix chromecast audio backend (#1790) 2018-09-10 13:20:38 -05:00