Commit Graph

1708 Commits (24a80d60c30620a45d416c34d16133dfa0f278d4)

Author SHA1 Message Date
Matthew D. Scholefield 78a6ec1ceb Fix cli crash with Python 3
This worked in Python 2 because type(4 / 2) == int but in Python 3 type(4 / 2) == float
2018-04-27 08:56:47 -05:00
Åke Forslund a2993e4ba6 Remove backwards compatibility with python 2.7 2018-04-27 08:51:47 -05:00
Åke Forslund b200d51d39 Fix test cases under python 3
Lots of minor fixes including, sorting dicts, making ints of strings,
     MagicMock file spec and some other things

A couple of issues in the mycroft-core code base were identified and
fixed. Most notably the incorrect version check for python three when
adding basestring.

Update .travis.yml
2018-04-27 08:50:46 -05:00
Åke Forslund 8840a43886 Fix hashes in settings for python3
convert strings to bytes before hashing
2018-04-27 08:50:46 -05:00
Åke Forslund d4ba484ad9 Make text client python2/3 compatible
- Make str unicode string
- Use BytesIO for python2 and StringIO for python3
2018-04-27 08:50:46 -05:00
Åke Forslund c6584d603d Make speech client python3 compatible 2018-04-27 08:50:46 -05:00
devs-mycroft ad49a48d34 Version bump from 18.2.4 to 18.2.5 2018-04-27 08:59:31 +00:00
Michael Nguyen afd0dbb084 removed unecessary LOG 2018-04-26 16:18:31 -05:00
Michael Nguyen e941a1d0a7 removed unknown member from exception object 2018-04-26 16:17:45 -05:00
Michael Nguyen e05765bc12 change HTTPError exception into RequestException for a more general case 2018-04-26 15:23:10 -05:00
Michael Nguyen fbca77d8fc add try catch for failed remote fetch location 2018-04-26 14:39:53 -05:00
Åke Forslund 29a2e14a2f Fix google tts now playing audio
The file extention of the audio was not set properly in the google_tts causing it to fail to playback the synthezised audio
2018-04-26 15:08:35 +02:00
Åke Forslund d1d4256e05 Fix websocket reconnect
Making sure the reconnect code is reached after websocket closed error.
2018-04-19 16:00:01 -05:00
Åke b63928888b
Merge pull request #1545 from MycroftAI/feature/ssml
Add SSML support for TTS
2018-04-19 19:01:54 +02:00
Åke Forslund d03eb4ed70 Add Microsoft NCSI as a backup to detect connection
Since on some networks port 53 is blocked the old method failed on
occation. This adds a backup method using standard requests.

Read https://blogs.technet.microsoft.com/networking/2012/12/20/the-network-connection-status-icon/ for more info on the NCSI check.
2018-04-19 11:02:05 -05:00
Matthew D. Scholefield ac26131b71 Fix SSML when tag spans multiple sentences
Now, sentence splitting is disabled if the utterance contains any xml tags
2018-04-18 14:45:09 -05:00
Matthew D. Scholefield cbf73d4b30 SSML Changes
- Engines now specify if they support ssml rather than the configuration
 - The text client strips out ssml tags
 - Engines can modify tags via the `self.modify_tag` method
2018-04-18 14:45:09 -05:00
Jarbas 7c6af2017c add SSML support 2018-04-18 14:45:09 -05:00
Sergio Oller 5e8d8eb1a6 Feature: Allow comments in voc and regex files
When loading voc and regex files, lines starting with "#" are now
ignored, so developers and translators can use them to document their
decisions.

==== Fixed Issues ====
2018-04-14 21:53:14 +02:00
devs-mycroft c6ed6f291b Version bump from 18.2.3 to 18.2.4 2018-04-12 18:27:21 +00:00
Åke aa4261252b
Merge pull request #1519 from MycroftAI/feature/stop-sigint
Shutdown improvements
2018-04-12 12:07:02 +02:00
Åke Forslund d61e3c2dd0 Extra safety around skill specific shutdown
Catch error in shutdown method of skill and continue with general shutdown
2018-04-12 11:11:04 +02:00
Matthew D. Scholefield fa11ac7dbe Rename MycroftSkill.shutdown to MycroftSkill._shutdown
This removes the need for skills to call Super(MySkill, self).shutdown()
2018-04-11 21:29:14 -05:00
Matthew D. Scholefield 10bd9a1cf3 Change initial kill to SIGINT
This sends a ctrl+c signal to each process which will allow code to exit properly by handling KeyboardInterrupt
Other notable changes:
 - create_daemon method used to clean up create daemon threads
 - create_echo_function used to reduce code duplication with messagebus
 echo functions
 - wait_for_exit_signal used to wait for ctrl+c (SIGINT)
 - reset_sigint_handler used to ensure SIGINT will raise KeyboardInterrupt
2018-04-11 21:29:10 -05:00
Matthew D. Scholefield 2e005a99e8 Support triggering skill settings update via a message 2018-04-11 15:24:07 -05:00
Matthew D. Scholefield 8cd8eb65b1 Decrease polling to 60 seconds
Now that the server uses ETags, it should be fine with polling every minute
2018-04-11 15:24:07 -05:00
Michael Nguyen 3e2f008c12
Merge pull request #1523 from forslund/bugfix/shutdown-sheduled-events
Fix cancel_all_repeating_events()
2018-04-10 11:15:11 -05:00
Åke 6d339039de
Merge pull request #1524 from forslund/feature/Jarbas-messagebus-intent-control
Add enable/disable intent using the messagebus.
2018-04-06 13:37:24 +02:00
Åke Forslund 58325a83fd Fix cancel_all_repeating_events
Unnamed repeating events caused an exception in
cancel_all_repeating_events, this makes sure the event name is stored
correctly and fixes the issue.
2018-04-06 11:34:36 +02:00
Jarbas 9f1c5e4cbf External enable/disable intent
Allow intents to be enabled or disabled from outside of the skill via
the messagebus.

Adds mycroft.skill.enable_intent and mycroft.skill.disable_intent
2018-04-05 23:29:44 +02:00
Åke bcc423825c
Merge pull request #1520 from MycroftAI/feature/api-etags
Add support for ETag caching
2018-04-05 11:46:59 +02:00
Åke Forslund 851e3b2aa4 Add comments and docstring for the send method
Add docstring explaining the basics of the send method.
2018-04-05 11:20:55 +02:00
Greg Cowan dfa9a65e96 Default skill config to empty dict (#1521)
This defaults skill's configs to an empty dict instead of None,
which simplifies getting specific values in the config for skills.
It removes the check for None config.

==== Fixed Issues ====

====  Documentation Notes ====
Skill writers no longer need to check for None configs.
2018-04-04 23:12:55 -05:00
Matthew D. Scholefield 9f843993b6 ETags support for all requests 2018-04-03 17:01:03 -05:00
Sergio Oller 69fb9ab4fe Initial Spanish bits for mycroft-core 2018-03-30 13:46:12 +02:00
devs-mycroft 1dee7fc381 Version bump from 18.2.2 to 18.2.3 2018-03-30 01:19:12 +00:00
Åke 56a7e4cd01
Merge pull request #1512 from forslund/feature/whitelist-spotify
Re-enable spotify-skill.
2018-03-29 13:58:37 -05:00
Åke bc74c36713
Merge pull request #1508 from MycroftAI/feature/notify-backend-down
Add proper messages when the backend replies incorrectly
2018-03-29 12:53:34 -05:00
Åke Forslund f94ee8d795 Load the volume skill before updates
Allows the user to adjust the volume during pairing
2018-03-29 12:13:28 -05:00
Åke Forslund 27fcd63e96 Fix error on wait_for_response timeout.
Using pyee 1.0.1 handlers registered with once can't be removed. This handles the value error raised in this case.
2018-03-29 12:10:20 -05:00
Åke Forslund 7332c3b344 Re-enable spotify-skill.
Remove spotify-skill from the black list
2018-03-29 18:47:20 +02:00
Åke Forslund de6d3e2f11 Fix deadlock
The emitted event "open" will in many cases call ws.emit, and this will
lock if the connected_event isn't set. This makes sure that the
connected_event is set before emitting the open event.
2018-03-29 10:09:11 -05:00
Åke 46f6f734e3
Merge pull request #1509 from MycroftAI/feature/wait-for-messagebus
Wait for messagebus before emitting a message
2018-03-28 19:28:35 -05:00
Matthew D. Scholefield 5c8cf053a0 Remove code that waits for websocket to open
This is unnecessary now that WebsocketClient does this automatically
2018-03-28 19:19:56 -05:00
Matthew D. Scholefield e6a211a0aa Wait for websocket to connect before interacting with messagebus 2018-03-28 18:40:50 -05:00
Åke Forslund 424001c973 Fix utterance_remainder for normalized keywords
If the sentence is normalized the utterance_remainder() method fails if
the intent keyword expects normalization.

Example the joking skill has an intent "tell me joke" which is the
normalized equivalent of "tell me a joke". In this case the intent wouldn't be removed from the remainder and instead of an empty string the utterance remainder would contain "tell me joke"
2018-03-28 16:17:53 -05:00
Åke Forslund 2e0a622447 Log exception and exception message 2018-03-28 15:38:14 -05:00
Åke Forslund 26d6e674df Reduce audio service logging verbosity
- Duplicates removed
- Many debugging messages reduced to debug level
2018-03-28 15:38:14 -05:00
Matthew D. Scholefield eb100706df Add proper messages when the backend replies incorrectly 2018-03-28 11:48:05 -05:00
Michael Nguyen 2caf77bc9d
Merge pull request #1481 from forslund/feature/repeating-event-safety
Feature/repeating event safety
2018-03-27 19:15:32 -05:00
jarbasai 24d022d00a active flag 2018-03-27 18:08:49 +02:00
jarbasai 5905a6460b Add mplayer audio backend 2018-03-27 18:08:32 +02:00
Åke 339c23eb83
Merge pull request #1503 from MycroftAI/feature/mycroft_deepspeech_stt
Feature/mycroft deepspeech stt
2018-03-23 17:08:50 -05:00
Michael Nguyen 1683e54389 remove exception 2018-03-23 16:58:33 -05:00
Åke e87b247fd7
Merge pull request #1501 from JarbasAl/bug_fix_utterance_remainder
Make Message.utterance_remainder more robust.
2018-03-23 14:20:44 -05:00
Åke eac0d81e94
Merge pull request #1502 from JarbasAl/bug_fix_audio_service_old_class_style
AudioService - no old style class
2018-03-23 13:17:04 -05:00
Michael Nguyen 66991f8d25 added exception 2018-03-23 11:46:21 -05:00
jarbasai 8cf915b83e no old style class 2018-03-23 15:07:21 +00:00
jarbasai 364370abad more robust utterance_remainder 2018-03-23 14:59:51 +00:00
Michael Nguyen 7692389317 remove logs 2018-03-22 13:33:10 -05:00
Michael Nguyen 6dbb2182ff added mycroft deepspeech factory in stt 2018-03-22 13:28:24 -05:00
InconsolableCellist 7447dbd5ea Simple log output change to prevent confusion (#1497)
Modified the debugging message output after an utterance is complete, to
make it clear that metric data is only sent if opt_in is enabled.

This addresses #1494, which I filed in error, thinking that opt_in was
never checked (due to reading the log output and not knowing it was
checked elsewhere)

==== Fixed Issues ====

==== Localization Notes ====
Slight change to existing, unlocalized text
2018-03-22 13:18:11 -05:00
Åke 06a82bd308
Merge pull request #1496 from MycroftAI/bugfix/remove_unused_function
Remove unused function in skill settings
2018-03-22 10:46:18 -05:00
jarbasai 8d277747a9 honor "active" flag for audio backends
The backends are active by default, but can be enforced or disabled with
the active flag.
2018-03-22 04:44:56 +01:00
Åke 69ab3498c6
Merge pull request #1488 from JarbasAl/feature_audio_clean_shutdown
Clean audio service shutdown
2018-03-21 22:30:06 -05:00
jarbasai 6fefac1c88 add stop 2018-03-22 04:17:33 +01:00
jarbasai 7b4a3b49ed clean shutdown 2018-03-22 04:17:24 +01:00
Åke 1e85830de9
Merge pull request #1486 from JarbasAl/pt-pt-core_dialog
Add missing pt-pt dialog files
2018-03-21 21:43:29 -05:00
Michael Nguyen d6b4037258 remove unused function in skill settings 2018-03-21 14:49:31 -05:00
jarbasai a865930fd7 fix previous 2018-03-17 16:23:21 +00:00
Åke Forslund 764d200d1b Only allow one repeating even of each type
Previously if duplicates of a skill should be launched or a skill isn't properly
shutdown when reloaded multiple handlers could be registred. This commit disables multiples of repeating events.
2018-03-15 12:39:25 +01:00
Åke Forslund 6dae1bb328 Do not reschedule an active repeating event
- Hinder multiple events with the same name to be registered
- Automatically cancel repeating events when skill is shutdown
2018-03-15 11:42:08 +01:00
jarbasai 0cbecc27d4 add missing pt-pt dialog files 2018-03-14 21:01:27 +00:00
devs-mycroft e66ddd669f Version bump from 18.2.1 to 18.2.2 2018-03-14 18:47:36 +00:00
Åke dc538ecf60 Blacklist spotify-skill (#1479)
Emergeny blacklist to kill the poorly behaving Spotify OAUTH
2018-03-14 13:41:35 -05:00
devs-mycroft 330514421b Version bump from 18.2.0 to 18.2.1 2018-03-14 08:40:50 +00:00
Steve Penrod 8ef691ffb7
Slowing the skill setting poll to once every 5 min
Experiment to see if this is overloading the backend.
2018-03-14 03:37:57 -05:00
Matthew D. Scholefield 9eb458360b Fix accessing non-existent attribute in except blocks
.request.status_code is only available to HTTPError objects
2018-03-14 00:41:47 -05:00
Michael Nguyen b884378fbb
Merge pull request #1466 from forslund/feature/quieter-skill-fetching-error
Reduce verbosity when skill settings fetch fails.
2018-03-11 12:34:07 -05:00
Åke Forslund 65cba626fd Reduce verbosity when skill settings fetch fails.
Replace the stack trace with a shorter message, briefly printing the cause.
2018-03-11 17:05:52 +01:00
Åke 2c151fe594
Merge pull request #1458 from MycroftAI/refactor/handler-args
Refactor event handler argument calling
2018-03-08 08:29:40 +01:00
Åke 4ed25f458a
Merge pull request #1459 from MycroftAI/bugfix/api-crash
Fix local service crash when servers are down
2018-03-07 21:21:44 +01:00
Åke Forslund b4ed9369fd Handle exception in skill shutdown
An exception raised during the shutdown would previously cause the skill reload process to halt. This catches any exception and reports the error without halting the SkillManager
2018-03-07 13:23:45 -06:00
Åke Forslund 11bae2aea3 Fix issue in skill shutdown.
If super's shutdown was called before trying to cancel events an exception would be thrown since shutdown removed all registered events by setting self.events to None.

This replaces this with an empty list to allow skills to try to remove events/cancel events without incidents.
2018-03-07 13:23:45 -06:00
Matthew D. Scholefield 7e64b49fa3 Replace HTTPError with RequestException
This prevents things like a ReadTimeout exception crashing the speech service
2018-03-07 10:57:13 -06:00
Matthew D. Scholefield 0962a3b6af Fix potential crash in add_event 2018-03-07 10:13:20 -06:00
Matthew D. Scholefield 4131730089 Refactor handler argument calling 2018-03-07 10:12:13 -06:00
devs-mycroft 7401d3fcf2 Version bump from 18.2.-1 to 18.2.0 2018-03-01 13:31:19 +00:00
Åke Forslund 0dbbb0cb70 Prepare release number for 18.2.0
Release script will increment it from -1
2018-03-01 14:18:41 +01:00
Åke 2719f96950
Merge pull request #1454 from MycroftAI/bugfix/intent-mixups
Use function attributes for intent decorators
2018-03-01 08:37:45 +01:00
Åke 5a68908e80 Call callback when remote settings are inited (#1452)
When a fresh image first updates the settings after pairing it is handled somewhat differently and this was missed in the original implementation of the callback handling.

This minor change includes this case as well.
2018-03-01 01:07:55 -06:00
Matthew D. Scholefield 881687012e Train Padatious on mycroft.skills.initialized (#1455)
Fix sporadic issues from training prematurely.
2018-02-28 21:55:14 -06:00
Matthew D. Scholefield b67c3314d7 Add proper not loaded message (#1456)
Once skills load, skill-unknown will handle all failed fallbacks. The only time this is spoken is when skills still aren't loaded yet
2018-02-28 21:49:11 -06:00
Matthew D. Scholefield 07ce2d98d0 Use function attributes for intent decorators
This prevents needing to use a shared list which misbehaves when multiple skills initialize at once
2018-02-28 19:13:33 -06:00
Matthew D. Scholefield cdb1416252 Check for pairing before performing routine polling (#1451)
This gets rid of error messages during the pairing process
2018-02-28 15:41:23 -06:00
devs-mycroft b093ec3fff Version bump from 0.9.18 to 0.9.19 2018-02-28 09:37:41 +00:00
Matthew D. Scholefield 50fa87d78f Simplify version checking 2018-02-27 21:01:11 -06:00
Zachary T Welch a7044f9967 only NTP sync on certain enclosures 2018-02-27 18:00:33 -06:00
Åke 743082734c Fix multiple triggering of repeating events (#1435)
If the scheduler was frozen for some time and the repeating event
scheduled time passes it would trigger the event constantly until the
next time is in the future again.

This will make the scheduler to disallow scheduling in the past and
instead schedule the next call one repeat period from now.
2018-02-27 16:37:29 -06:00
Matthew D. Scholefield ce908b6098 Add message when skills are initialized (#1449)
Posts ```mycroft.skills.initialized``` once the initial skill load completes.
2018-02-27 16:22:40 -06:00
Åke 50b05ae6b4
Merge pull request #1446 from MycroftAI/refactor/exceptions
Remove redundant except (SystemExit, KeyboardInterrupt) clauses
2018-02-27 23:08:27 +01:00
Zachary T Welch 6df3cc0765 improve output when no words are transcribed 2018-02-27 15:48:05 -06:00
Åke aa594aebea
Merge pull request #1448 from MycroftAI/bugfix/platform-comment
Fix platform comment in config
2018-02-27 22:09:21 +01:00
Matthew D. Scholefield 0b9dc9c630 Fix platform comment in config 2018-02-27 14:56:04 -06:00
Matthew D. Scholefield 98eaa83db8 Fix audio service loading
If service_module failed to load, it shouldn't continue loading it
2018-02-27 14:37:37 -06:00
Matthew D. Scholefield fbb9231adc Remove redundant except (SystemExit, KeyboardInterrupt) clauses
This can be replaced by ensuring the final except clause is 'except Exceptions'. This works because SystemExit and KeyboardInterrupt do not inherit from the base 'Exception' class
2018-02-27 14:28:29 -06:00
devs-mycroft fdcd4e7a2c Version bump from 0.9.17 to 0.9.18 2018-02-27 09:36:46 +00:00
Matthew D. Scholefield 80cbf6799c Fix invalid command 2018-02-26 12:03:25 -06:00
Matthew D. Scholefield 93e34985f1 Change precise executable to a folder
This prevents self-extraction each bootup
2018-02-23 18:05:30 -06:00
penrods e52a503345 Improve docs within mycroft-conf
Clarified the merging process.  Also remove unused skill-sepecif settings.
2018-02-23 10:49:54 +01:00
penrods 0dd337d44c Tweaks to CLI: Refresh, scroll fix
Several tweaks to CLI behavior
* The "show/hide meter" setting is now persisted
* Fix behavior when scrolled back and logs are rolling off
* Fix potential crash when no logs exist
* Add Ctrl+R to force a refresh (undocumented for now-- help page is getting long and we need an automated system to resize help for smaller screens)
2018-02-23 03:20:23 -06:00
Åke 1578f16897 Make sure the cli locale is set to an UTF-8 type (#1438)
If the locale setting fails add exit with a simple error message suggesting workaround
2018-02-23 03:05:58 -06:00
Zach Welch 49b1a0ca5c issue #1083: limit history size to fix crash (#1436)
The calulated limit ensures that at least one message will be displayed.
Using a hard-coded constant is ugly, but such are scattered throughout
the script.  Untangling those constants has been left for future patch.
2018-02-23 01:54:20 -06:00
Matthew D. Scholefield efc1c1d71e Wait while speaking before running __get_response (#1432)
This fixes issues with long TTS responses
2018-02-23 01:49:06 -06:00
Åke b58a533e39 Bugfix/munging related issues (#1434)
* Fix error message for enable_intent

The error was printed for each intent name mismatch instead of after all intents had been checked.

* Make sure intents aren't munged multiple times

Previously intents could be munged multiple times (This happened when enabling a disabled intent), resulting in an invalid name.

* Add test case for disable/enable intent

* Improve unmunging of messages

This make sure that only skill id's in the beginning of messages are removed and should speed up the process slightly

* Fix munging for register_vocab and register_regex

* Add testcases for register vocab and regex
2018-02-23 00:51:55 -06:00
devs-mycroft b103b1f90a Version bump from 0.9.16 to 0.9.17 2018-02-16 11:31:21 +00:00
Matthew D. Scholefield b57165477c Fix self parameter in decorator functions with single argument 2018-02-15 17:33:03 -06:00
Åke Forslund 7970f5bc9d optional start/completed messages for add_event
When creating event handlers with add_event now by default there are no
messages about start and completion of the handler.

The handler info base name is now passed as an argument to the method
allowing for custom messages. skill intent handlers still report
skill.handler.start and skill.handler.complete but for example scheduled
events wont send these start/stop (but could instead trigger for example
        skill.scheduled_event.start/complete)
2018-02-15 15:31:33 -06:00
Åke ea7c7efee1 Fix cancel_scheduled_event for non-repeating events by updateing pyee to v5.0.0 (#1425)
* Update pyee to v5.0.0

The old version of pyee (1.0.1) could not remove events registered as "once" (instead of "on")
This fixes canceling scheduled events

* Restore MycroftSkill.remove_event() return value

The return statement in remove_event() was missing, probably lost while handling a conflict.
2018-02-15 14:52:18 -06:00
Åke b4c6f63352 Validate message before trying to demunge (#1427)
The data field of the message sent to the event handler may not always be a dictionary, (Example case Timer skill, which sets data to the timer name)

This validates the message type and the type of the data field before trying to unmunge.
2018-02-15 14:11:21 -06:00
Steve Penrod ead38602cb
Add interface to Mark 1 faceplate capabilities (#1424)
* Add interface to Mark 1 faceplace capabilities

This adds API interfaces for two Mark 1 faceplace capabilities to the
mycroft.client.enclosure.EnclosureAPI()

EnclosureAPI.setpixel(index, r,g,b)
- Set individual eye pixels to any color.  The indices go from 0-23 with
  the 0-12 corresponding to the right eye and 11-23 to the left.

EnclosureAPI.fill(percentage)
- Fill the eyes to a percentage, for use in meters or countdowns.  The
  right eye is 0-50%, the left eye also fills if going up to 100%.
2018-02-15 12:29:35 -06:00
Åke 36b5e65e6b
Merge pull request #1416 from zecakeh/dev
Update French dialogues and add French formatting and parsing functions
2018-02-15 18:32:12 +01:00
Cakeh 713f48dd66 Fix missing import 2018-02-15 15:46:12 +01:00
Cakeh e7202868e5 Update sv format functions 2018-02-15 13:02:45 +01:00
Kévin C 692877fa07
Fix PEP8 issue 2018-02-15 12:53:51 +01:00
Kévin C f0869dcf31
Merge branch 'dev' into dev 2018-02-15 12:51:45 +01:00
penrods f54eacbd53 Add default when for schedule_repeating_event()
MycroftSkill.schedule_repeating_event(handler, when, frequency) now
will compute the 'when' as now+frequency seconds if None is passed.
2018-02-15 05:40:38 -06:00
Cakeh 7f733bdf75 Update nice_number_fr, en, pt, it docstring 2018-02-15 12:16:58 +01:00
Åke 7fd63f9d5a
Merge pull request #1421 from MycroftAI/feature/doc_cleanup
Internal documentation, typos, remove misleading message
2018-02-15 10:51:33 +01:00
Åke 3271ff3e24
Merge pull request #1420 from MycroftAI/feature/cli_declutter
Reduce CLI log clutter from settings, etc
2018-02-15 10:31:51 +01:00
Åke ed6ab224c9
Merge pull request #1422 from forslund/feature/munge-keywords
Make keywords per skill to fix overlapping keyword names
2018-02-15 09:57:03 +01:00
Steve Penrod 8139727714
Merge branch 'dev' into feature/doc_cleanup 2018-02-15 02:48:10 -06:00
Åke bda8a0cc94 Skip skill update on startup if recent (#1392)
* Skip skill update on startup if recent

Skills aren't updated on startup if the last update was less than 12
hours ago.

- msm adds a .msm file in the skills directory with a timestamp and a
    list of the skills installed by default
- the UPDATING screen message is moved to the SkillManger when direct
    update is scheduled.
- On internet connection the skill update time is scheduled
- Skills (other than priority skills) are not loaded until
- The timeout for when direct update is necessary is settable in the
    config.
internet connection has been verified (message on messagebus)
2018-02-15 02:43:06 -06:00
Steve Penrod 23302b60d9 Add copyright notice and minor docstring changes 2018-02-15 09:29:04 +01:00
Åke Forslund 378d353572 Move data loading helpers to separate file.
All methods relating to loading vocabulary, dialog and regular
expressions has grown quite large. To make the core functionallity of
the skills more readable these are moved to the new module skill_data.

Additional method documentation has been addedi as well.
2018-02-15 09:28:27 +01:00
Åke Forslund 51ed5cd810 Munge keywords for intents
Convert keyword names to unique names by prepending the keyword with a
letter string derived from the unique skill id.

This commit modifies required keywords, optional keywords, one_of
keywords and regex matches.

This also munges the context keyword when that is sent to match the
intent correctly
2018-02-15 09:26:35 +01:00
Åke 5327b35f31 Disable overflow exceptions when reading mic (#1359)
Many thanks to mikonse for troubleshooting and suggesting this fix.

==== Fixed Issues ====

====  Tech Notes ====
Disabling this exception should free up the audio producer thread to
continue deliver the available sound data.
2018-02-15 02:23:36 -06:00
Åke Forslund 44387522a6 Move docstring, correct typos 2018-02-15 09:10:39 +01:00
Åke f8fec82905 wait_for_response method for synchronous messagebus communication (#1423)
* Add wait_for_response method to Websock client

The client handles the basic case when wanting to do a syncronous
request-response action.

The method sets up a handler waits for the response and handles timeout.

The expected format is that the reply message should have the same type as
the original message with ".response" appended.

An method in the Message class has been added to create a standard response for
a message.

* Let the :skills command use wait_for_response

* Minor docstring changes

Fixed typos and refined text
2018-02-15 01:39:11 -06:00
penrods 2af217bed0 Wrote and cleaned up more docstrings
Made docstrings more consistent with the preferred 'Google Style Docstring'
standard:
http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
2018-02-14 17:25:57 -06:00
Michael Nguyen 50c7ab6c6e
Merge pull request #1364 from forslund/bugfix/scheduled-event
Bugfix/scheduled event
2018-02-13 22:34:51 -06:00
Augusto Monteiro 2b1e5b2714
Merge pull request #1400 from forslund/feature/swedish-lang-utils
Add format and parsing methods for swedish
2018-02-13 09:38:15 -03:00
penrods fa589fead4 Quiet PEP8 2018-02-13 03:05:43 -06:00
penrods c68ad44b1c Internal documentation, typos, remove misleading message
* Made MycroftSkill.remove_event() return a bool, preventing unnecessary/misleading message from being posted by MycroftSkill.cancel_scheduled_event()
* More doc and several minor renames around intent processing
* Several minor typo and doc corrections
2018-02-13 02:54:12 -06:00
penrods 920845c407 Reduce CLI log clutter from settings, etc
* Drop settings INFO messages to DEBUG
* Add DEBUG filter in the CLI by default
2018-02-13 02:40:44 -06:00
Cakeh 85a13309e9 fix codacy issues 2018-02-12 12:21:07 +01:00
Cakeh c1918da9cb Add fr support for ordinal numbers and time qualifiers 2018-02-12 12:02:54 +01:00
Cakeh c45d228d91 Issue-1411 - Leave all nice_number formatting to language 2018-02-12 12:02:04 +01:00
Cakeh 9b5f4dd09c Fixed variable name change 2018-02-08 22:38:50 +01:00
Cakeh fcbf2eae9e Correct issues found by Codacy 2018-02-08 22:20:56 +01:00
Cakeh 3a11f39d7d Issue-1375 - Fix and complete french translation 2018-02-08 21:46:24 +01:00
Åke 708d3ecce1
Merge pull request #1412 from MycroftAI/feature/fix_nice_time
Fix bug in nice_time() for times before noon
2018-02-08 14:08:42 +01:00
Åke 9e8461b087
Merge pull request #1413 from forslund/feature/it-time-and-numbers
Add Italian nice_time() and pronounce_number()
2018-02-08 11:23:31 +01:00
Ale 27f974c3fe inserted new italian functions adapted from en
Add new tests for nice_time() and pronounce_number()
2018-02-08 10:58:36 +01:00
penrods 420b21e40e Fix bug in nice_time() for times before noon
Bonehead copy/paste and testing gap left a bug that reported things
like "negative 11 o'clock"
2018-02-08 01:29:05 -06:00
Augusto Monteiro dd0012c2a1
Merge pull request #1367 from forslund/feature/track-start-message
Add message on track start
2018-02-07 12:56:05 -03:00
devs-mycroft 154dc18ec5 Version bump from 0.9.15 to 0.9.16 2018-02-02 16:39:52 +00:00
Åke Forslund b632377e0e Check that value exists before checking for change
An error occured when testing skill settings when checking if the settings should be sent when trying to upload a field without a value. To guard against this there is a check if the field has a value before checking.
2018-02-02 15:03:41 +01:00
Michael Nguyen 9c80112fd9 added fix for new schema from backend 2018-02-01 18:44:21 -06:00
devs-mycroft 422c862b50 Version bump from 0.9.14 to 0.9.15 2018-02-01 22:14:10 +00:00
Åke Forslund a11b093e4d Add format and parsing methods for swedish 2018-02-01 15:32:08 +01:00
Åke 32a66b0111
Merge pull request #1399 from forslund/feature/jony0008-swedish
Add Swedish dialogues. Original PR #1386
2018-02-01 14:44:46 +01:00
Åke Forslund ea99d9392e Add sv-se dialog translations based on sv-fi 2018-02-01 14:20:23 +01:00
Åke Forslund dc599f86ee Move translation by jono0008 to sv-fi 2018-02-01 10:40:04 +01:00
Åke f0e695bbc4 Feature/metrics classes (#1393)
* Report type of TTS when reporting tts metrics

* Report type of STT when reporting stt metrics
2018-02-01 02:35:27 -06:00
Åke 0e3acbada4 add :skills command to list skills in cli (#1395)
SkillManager now handles the skillmanager.list message and will reply with the
mycroft.skills.list message including a list of the loaded skills.

==== Protocol Notes ====
Added messages:
- skillmanager.list: skill manager send list of skills on messagebus
- mycroft.skills.list message with skill list
2018-02-01 02:14:38 -06:00
Jony 3b55012e7c Add sweish translation of dialogs 2018-02-01 09:05:46 +01:00
Åke 2309c9cd33
Merge pull request #1397 from MycroftAI/bugfix/skill-settings-disappearing
The bug was due to identifier collisions in the backend as well as settingsmeta schemas with a label field with no name attribute. This fix will make sure there are no more identifier collisions with already existing broken settingsmeta schemas in the database.
2018-02-01 08:56:21 +01:00
Åke b8893a7643 Ignore .files when checking for skill modification (#1378)
This ignores all files starting with . when checking for modifications
of skills
2018-02-01 01:53:57 -06:00
Åke b2af245554 Add match_one fuzzymatching function (#1372)
match_one finds the closest match for a query in a list or dictionary of
possibilities.
2018-02-01 01:52:14 -06:00
Michael Nguyen 9af4b95650 modified identifier, add .mypy_cache to git ignore 2018-01-31 09:42:44 -06:00
Åke 1b8ebaf47b
Merge pull request #1396 from forslund/feature/jarbas-skill-loading-messages
- Add shutdown and load failed messages.
- Add folder name and modification time to mycroft.skills.loaded message data
2018-01-31 15:41:13 +01:00
Åke Forslund acdeb0853e Minor fix for code coherency 2018-01-31 15:26:24 +01:00
jarbasai 98960012bb add skill load fail message 2018-01-31 14:58:04 +01:00
jarbasai 93860da4a0 loaded skills bus messages 2018-01-31 14:57:50 +01:00
Åke Forslund 044c4c3c0f Fix broken test and codacy warning
- Restore nice_number_it
- Fix codacy warning about overriding str
- Fix octal representation of times in convert_time test
2018-01-31 14:09:06 +01:00
penrods 2811a74adc Remove now-private method 2018-01-31 05:31:16 -06:00
penrods 6dbf1e72d7 Add formater for numbers and time
Add support for:
* mycroft.util.format.nice_time()
* mycroft.util.format.prounce_number()
* implemented unittests for above

Also renamed the helper method convert_number() to
_convert_to_mixed_fraction()
2018-01-31 05:30:01 -06:00
Ale 3a90ba7132 Update italian texts 2018-01-29 09:49:36 +01:00
Ale c56b293d3d Update italian parsing methods
Add extract_datetime_it
Add tests for italian methods
2018-01-29 09:47:10 +01:00
Michael Nguyen 02eb1b8277
Merge pull request #1379 from forslund/feature/settings-changed-callback
Add callback on settings change from backend
2018-01-25 15:21:15 -06:00
Åke d9c288129c Add support for deepspeech_server (#1370)
* Add support for deepspeech_server

deepspeech_server is a server running deepspeech (obviously). It's quite
easy to install and run (package available in pip and then a config file
pointing to the model)

This pr adds the DeepSpeechServerTTS class, a STT interface allowing
mycroft to use one of these servers.

config needed:

  "stt": {
    "module": "deepspeech_server",
    "deepspeech_server": {
      "uri": "http://IP-ADDRESS:PORT/stt"
    }
  }

* Add deepspeech_server example to mycroft.conf
2018-01-25 14:02:42 -06:00
Ale 158b25170b translate italian functions for format.py and parse.py based on pt_pt job (#1363)
Add basic functions for Italian language

- nice_number()
- extract_number()
- normalize()
2018-01-25 15:58:32 +01:00
Åke Forslund aab426a140 Add settable callback on change from backend
If settings are updated a callback can be set to notify the skill that a
change has occured.
2018-01-23 17:12:09 +01:00
Matthew D. Scholefield 856fed036b Restore captured text on cli exceptions 2018-01-19 16:46:51 -06:00
devs-mycroft 11cd652889 Version bump from 0.9.13 to 0.9.14 2018-01-18 23:46:48 +00:00
penrods 26444c9c5f Tweak UI for NTP checking
Withe the NTP checks in place, the sequence of visual and audio queues
was a little clunky.  This refines it slightly for normal use and to
play better with the pairing process.
2018-01-18 14:44:53 -06:00
Jarbas 5541c4717f is_remote_list check (#1365)
use is_remote_list() to verify that a list needs to be converted for use in mycroft.
2018-01-18 12:12:02 +01:00
Steve Penrod 4a62ab5a40 Implement max-line to limit memory usage (#1369)
* Implement max-line to limit memory usage

The major point of the PR is to limit the memory usage of the CLI by
implementing a maximum log limit.  It defaults to 5000.

Other changes:
* Add "--debug" option to support troubleshooting/debugging the CLI itself
* Add support for jumping to the top (Ctrl+T/Ctrl+PgUp) or bottom (Ctrl+B/Ctrl+PgDn) of the logs.
* Remove the "OLDEST" message from the log.  It was really no longer necessary since the log navigation issues got straightened out, and it complicated the max log line logic.
2018-01-18 09:44:29 +01:00
penrods e142b1f92b Update help to reflect changed message name 2018-01-17 21:51:39 -06:00
penrods a6bfed268b Fix Codacy gripe and add new .dialog 2018-01-17 21:16:39 -06:00
penrods 6c1cdb47b3 Fix startup time-warp issue
Raspberry Pi's don't have a built-in clock, so at boot-up the clock just picks up from when they were last running.  Normally this is corrected very quickly by NTP from an internet server, but if there is no network connection that cannot happen.

When an out-of-the-box Mark 1 or Picroft is being setup, the clock is set to whenever the image was created.  Upon completing the Wifi setup step the NTP service can finally sync with the internet, so time suddenly "jumps" to weeks later -- usually.  In either case (when the date jumps or when the date is erronously months old), there is potential for havoc.

These changes deal with that situation.  Upon network connection, an NTP synchonization is forced.  If it is detected that a major time jump happened
(more than 1 hour), then the user is notified that the clock change requires
a reboot and the system restarts.

Other changes:
* use the new "system." message namespace
* add pause before the system.reboot during a WIPE, allowing reset to totally complete
*
2018-01-17 21:05:51 -06:00
Åke Forslund 12da2070b2 Add message on track start
====  Tech Notes ====
When a new track starts playing the audio service will send a message
indicating which track has started.

==== Protocol Notes ====
"mycroft.audio.service.track_start" message added
2018-01-17 15:15:23 +01:00
Åke Forslund 6c4f485323 Make handlers for single scheduled events one shot
- add_event() now accepts the parameter once, registring the event as a one shot event.
- remove_event for non-existing events is handled
- added a test for this
2018-01-16 17:39:51 +01:00
Steve Penrod b18821d338
Fix PEP8 2018-01-15 01:25:40 -06:00
Matthew D. Scholefield cc65e045e6 Fix Sphinx documentation 2018-01-12 19:04:13 -06:00
Åke 121787de1f
Merge pull request #1260 from JarbasAl/bing_tts
Add Bing tts option.
2018-01-09 21:16:05 +01:00
jarbasai 29e18cba8f fix bing gender 2018-01-09 19:16:39 +00:00
jarbasai 5c14fb3b62 bing tts 2018-01-09 19:16:26 +00:00
jarbasai f1c64471c6 bing tts 2018-01-09 19:15:28 +00:00