Commit Graph

1709 Commits (408f0ef4bc5463d0b052797daa559ca3497814ef)

Author SHA1 Message Date
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
Jarbas 905e5397ed bing + houndify stt (#1229)
Add bing and Houndify stt backends
2018-01-09 13:41:26 +01:00
Åke Forslund c2a5288407 Update for latest changes 2018-01-08 18:04:07 -06:00
Åke Forslund a701e782e0 Replace open with more modern io.open
io.open is the default open in python 3 and sets encoding to unicode by
default.
2018-01-08 18:04:07 -06:00
Åke Forslund 6550b9c115 Attempt to allow CLI to display utf-8 encoded text. 2018-01-08 18:04:07 -06:00
Åke Forslund f88acdb60f Fix converse handling
Fallbacks were triggered even if utterance had been handled by converse.
This checks if converse handled the utterance as well.
2018-01-08 18:01:03 -06:00
Åke Forslund 4ac720ec53 Report None type as transcription when STT fails 2018-01-08 18:01:03 -06:00
Åke Forslund 936bd54180 Add a function to build the standard timing report 2018-01-08 18:01:03 -06:00
Åke Forslund 9d52c517f2 Add docstrings for stopwatch class 2018-01-08 18:01:03 -06:00
Åke Forslund c1d3342fc6 Add playback timing reports in playback thread
This covers the default case with mimic and in the future more as they
are moved over to using the playback thread
2018-01-08 18:01:03 -06:00
Åke Forslund fe3b85c755 Add tts into the flow by digging throug the stack
The speak method digs through the stack trying to find a Message object
and if found uses the context from that message when sending the data to
the speech subsystem.
2018-01-08 18:01:03 -06:00
Åke Forslund baa15b98aa Send timing metrics for various subsystems
====  Tech Notes ====
STT, intent handling, intent fallbacks, skill handlers are now timed and
tied together with a ident (consistent through the chain so the flow from
STT until completion of the skill handler can be follewed.

TTS execution time is also measured, right now this is not tied into the
ident due to the nature of the speech.

The report is always called "timing" and always contain the following
fields:

- id: Identifier grouping the metrics into interactions
- system: Which part (STT, intent service, skill handler, etc)
- start_time: timestamp for when the action started
- time: how long it took to execute the action

The different system adds their own specific information, for example
the intent_service adds the intent_type, i.e. which handler was matched.

==== Protocol Notes ====
mycroft.skills.loaded is sent togheter with skill id and skill name
whenever a skill is loaded. This is used in the intent_service to
convert from id to skill name when reporting
2018-01-08 18:01:03 -06:00
Åke Forslund cb35d4bb66 Handle network problems inside report_metric
Basically at any place where handle_metric is called I was adding a try-except
block to catch possible network/http issues. Due to this fact I feel
it's best to add it here.
2018-01-08 18:01:03 -06:00
Åke Forslund 72091f2b8e Add convenient methods to Stopwatch
- add with
- keep start time and stop time after stop
- str() will return a string of the time
2018-01-08 18:01:03 -06:00
penrods c88447a274 Add code to load appropriate config pieces 2018-01-08 17:09:58 -06:00
penrods 5fd05ad509 Add platform type/build to info sent to register
Add platform information (type and build #) to the messages
send to the server to pair and to update version info.
2018-01-08 17:09:58 -06:00
Åke Forslund 5e0aa28362 Fix code standard issues reported by Codacy 2018-01-08 17:08:31 -06:00
Åke Forslund 0114ce473e Split format.py and parse.py per language
Move the language specific functions and constants into separate files.
This will avoid many unnecessary conflicts due to involuntary encoding
changes.
2018-01-08 17:08:31 -06:00
Michael Nguyen 5d842fd369 removed log line 2018-01-08 17:02:49 -06:00
Michael Nguyen 884b65f0e4 fixed settings disappearing on load 2018-01-08 17:02:49 -06:00
Åke c3d0c1bcb9
Merge pull request #1261 from JarbasAl/ibm_tts
Add IBM Watson tts
2018-01-07 16:58:45 +01:00
devs-mycroft 3ad4e10918 Version bump from 0.9.12 to 0.9.13 2018-01-04 22:59:43 +00:00
Matthew D. Scholefield 716032215d Add model hash to wake word upload 2018-01-03 20:29:27 -06:00
Åke Forslund aed83da43f Add basic validation 2018-01-03 23:01:19 +01:00
Åke Forslund fd6ea82cab Fix Authentication for tts_ibm 2018-01-03 23:00:50 +01:00
Åke 02e9ad7bb0
Merge pull request #1287 from MycroftAI/feature/tts-phonetic-spelling
Add phonetic spelling option to TTS engines.

Allows to override words with better sounding alternatives listed in res/text/phonetic_spellings.txt
2018-01-03 14:53:06 +01:00
Steve Penrod f8f3d3534c Add message.utterance_remainder() method (#1314)
Add message.utterance_remainder() method

This helper will return the portion of an utterance not
consumed by the Adapt parser already.  For example,
"turn on the kitchen light" would have a remainder of
"the kitchen" if there was an Intent with entities that
matched "turn on" and "light". The returned text is passed
through normalize().
2018-01-03 14:26:49 +01:00
Åke 4da5939fd7
Merge pull request #1344 from forslund/JarbasAl-auto_update_optional
Optional skill auto-update by JarbasAI
2018-01-03 10:19:46 +01:00
Åke Forslund b19e73025f Minor cleanup 2018-01-03 10:09:34 +01:00
jarbasai 6bba0f0ae4 Optional auto update 2018-01-03 10:09:25 +01:00
Ale fd72eecc50 feature start support italian language (#1331)
Translate dialog resources to italian (it-it)
2018-01-02 18:01:59 +01:00
devs-mycroft 340980eef2 Version bump from 0.9.11 to 0.9.12 2017-12-23 02:48:08 +00:00
devs-mycroft e4e30e0035 Version bump from 0.9.10 to 0.9.11 2017-12-23 00:22:23 +00:00
Matthew D. Scholefield f56a2def72 Revert "Merge pull request #1305 from MycroftAI/feature/send-platform"
This messes up Pairing so it will be reverted until there is a backend
change to support it

This reverts commit 71611ca6be, reversing
changes made to c7da63c536.
2017-12-22 14:43:55 -06:00
penrods 5832cfafde Bump the required enclosure version to 1.3.0. This pulls in
the changes needed for upload.sh to not lock-up on a Picroft
installation of mycroft-core.
2017-12-22 12:32:40 -06:00
Åke 71611ca6be
Merge pull request #1305 from MycroftAI/feature/send-platform
Add platform type/build to info sent to register
2017-12-22 18:46:33 +01:00
penrods e4ca6e3a64 Add code to load appropriate config pieces 2017-12-22 02:34:01 -06:00
penrods 54bdf0d392 Add pause in out-of-box speech
The out-of-box spiel given by Mycroft was coming at the user pretty fast.
This adds a momentary pause in the spoken text.

Also cleaned up some ugly messagebus interaction to use the speak() method.
2017-12-22 01:48:45 -06:00
Åke 277e8bc506
Merge pull request #1320 from forslund/feature/oauth-token
Add oauth token endpoint to device api
2017-12-21 17:56:43 +01:00
Åke Forslund 2c0237cb8d Add oauth token endpoint to device api
When a token has been generated for the provided developer credentials
id the method will return it as json, if it doesn't exist HTTPError will
be raised (404 not found)
2017-12-21 14:52:48 +01:00
Michael Nguyen 8e2c97484c fixed skill settings migration for web ui 2017-12-20 15:59:09 -06:00
Åke Forslund 5c47ed8cd8 Allow aarch64 architecture to download arm binary
aarch64 linux systems should provide backwards compatibility for armv7
compiled binaries.
2017-12-20 15:46:33 -06:00
Åke Forslund 41c2f43022 Handle unknown architectures better 2017-12-20 15:46:33 -06:00
Augusto Monteiro e3243e2a62
Merge pull request #1307 from forslund/bugfix/extract_datetime
Minor fix of extract datetime
2017-12-19 15:15:22 -05:00
Åke 742558046d Python 2/3 compatibility (#1259)
Add Python 2/3 compatibility

====  Tech Notes ====
This allows the main bus, skills and cli to be run in both python 2.7 and
3.5+.

Mainly trivial changes
- syntax for exceptions
- logic for importing correct Queue module
- .iteritems -> future.utils.iteritems when accessing dicts key value
pairs

* Allow audio service to be run in python 3
* Make speech client work with python 3
* Importing of Queue version dependent
* Exception syntax corrected
* Creating sound buffer is version dependant
- Adapt context use range from builtins
- Use compatible next() instead of .next() when walking the skill
directory

* Make CLI Python 3 Compatible
- Use compatible BytesIO instead of StringsIO
- Open files as text instead of binary
- Make sure integer divisions are used

* Make messagebus send compatible
* Fix failing travis

Re-add future 0.16.0

* Make string checks compatible
* basestring doesn't exist in python 3 so it's imported from the "past"
* Fix latest compatibility issues in speech client
- handle urllib
- handle encoding before calling md5

* Make Api.build_json() python 2/3 compatible
2017-12-18 17:24:21 -06:00
devs-mycroft 08dfcb4780 Version bump from 0.9.9 to 0.9.10 2017-12-15 12:32:44 +00:00
Åke 52f9473a55
Merge pull request #1315 from MycroftAI/feature/fuzzys-revenge
Add new parse function fuzzy_match (take 2)
2017-12-15 13:14:16 +01:00
Åke 3063202dc0
Merge pull request #1313 from MycroftAI/feature/translate-values
Add MycroftSkill.translate_namedvalues()
2017-12-15 12:57:57 +01:00
penrods 5a12fc471c Add new parse function fuzzy_match (take 2)
A fuzzy_match() produces a basic ratio match of two strings.
The result is between 0.0 and 1.0, where 1.0 is a perfect
match.
2017-12-15 05:54:14 -06:00
Åke Forslund 9fa4b4e138 Empty except->except Exception:
This fixes pep8-speak issue
2017-12-15 12:40:41 +01:00
penrods de328a43d9 Fix PEP8 2017-12-15 05:19:11 -06:00
penrods 0385f46fcc Add MycroftSkill.translate_namedvalues()
This method will load a translateable (and expandable) list of names
and values from the dialog/xx-xx/ folder of a skill.  For example:

dialog/en-en/Colors.value
```
# List colors and their hex RGB values
alice blue, #F0F8FF
antique white, #FAEBD7
aqua, #00FFFF
```
2017-12-15 05:07:16 -06:00
penrods b4f5039f3d Fix misspelling in a text resource
Fixes a misspelling and removes the "i am awake.dialog" which is
no longer used.  (The dialog is handled by the (Sleep skill)[https://github.com/MycroftAI/skill-naptime] instead.
2017-12-15 03:56:51 -06:00
penrods fb9f6bb5f6 CLI: interpretation of VT100 keys was flipped
The mapping from a VT100 key to NCURSES PgUp/PgDn was inverted,
resulting in different behavior for a keyboard and monitor plugged
in to the Pi than when SSH'ed in to the unit.
2017-12-15 01:41:03 -06:00
devs-mycroft 294e13ab52 Version bump from 0.9.8 to 0.9.9 2017-12-14 04:59:01 +00:00
Åke Forslund 5b298c54cb Revert "Version bump from 0.9.8 to 0.9.9"
This reverts commit cbfe9c65b1.
2017-12-14 02:54:24 +01:00
devs-mycroft cbfe9c65b1 Version bump from 0.9.8 to 0.9.9 2017-12-14 01:35:28 +00:00
Michael Nguyen 4b7d6e5526 Feature/overwritten settings (#1304)
prevent settings initalization from skills __init__ to override settings.json values
2017-12-13 23:25:33 +01:00
Åke f61ccfeed7
Merge pull request #1308 from MycroftAI/feature/boot-sequence
Add boot sequence visual indicators
2017-12-13 19:47:25 +01:00
penrods e3988e6cdc Add boot sequence visual indicators
Creating several visual feedback points to let users know what is
occurring in the boot sequence.  This also expects a new version
of the enclosure.

* On shutdown and reset, change eye color to a dark gray
* On initial startup the enclosure will have left the eyes at a
  yellow color, indicating that it is on but not fully running yet.
  When the enclosure comes up (and doesn't kick off the out-of-box
  or the notice that they need to run wifi setup) it will begin to
  scroll an "UPDATING" message.

This assumes that someone else will remove the "UPDATING" message.
That gets handled by the Mycroft-Mark-1 skill, which resets the
mouth and sets the eye color to default.
2017-12-13 12:23:42 -06:00
Michael Nguyen 0bbb05ddd2
Merge pull request #1300 from MycroftAI/feature/meta-crashes
Protect against bad settingsmeta.json
2017-12-13 10:50:54 -06:00
Åke 4425bec936
Merge pull request #1302 from JarbasAl/enclosurefix
fix _hack_check_for_duplicates
2017-12-13 15:09:49 +01:00
Åke Forslund 01b37f06eb Handle "tonight" and text containing only a date
- "tonight" is re-interpreted as PM
- check is performed to check if previous word exist before accessing it
to handle sentences containing only a simple date
2017-12-13 15:00:57 +01:00
penrods f16dae18a2 Add platform type/build to info sent to register
Add platform information (type and build #) to the messages
send to the server to pair and to update version info.
2017-12-13 02:54:19 -06:00
Matthew D. Scholefield b70a3f488e Fix bug in rendering data in __translate_file 2017-12-12 13:47:01 -06:00
jarbasai 5c367e079a fix _hack_check_for_duplicates 2017-12-12 04:00:01 +00:00
jarbasai d7926cde07 pt unicode bug fix in normalization 2017-12-12 03:10:00 +00:00
jarbasai b301890cc5 pt unicode bug fix in datetime extract 2017-12-12 03:07:49 +00:00
jarbasai 745de21e57 pt unicode bug fix in number parse 2017-12-12 03:05:31 +00:00
Steve Penrod b56159f7d7 Fix pep8 issue 2017-12-10 06:09:18 -05:00
Steve Penrod 168b6b4dd5 Protect against bad settingsmeta.json
When there is an error in settingsmeta.json, the load of the skill
would fail.  Now it generates an error message but continues on.
Additionally the exception is caught and now displays information
about where the error in the JSON is (line and column).
2017-12-10 04:48:12 -05:00
Steve Penrod d0e7c10800 Add CLI log clearing and other tweaks
Several more tweaks for the CLI:
* Ctrl+Left and Ctrl+Right are now available to cycle through previous
  entries, just like Ctrl+P and Ctrl+N
* Added ":clear log" command
2017-12-10 04:41:47 -05:00
devs-mycroft 5c2e691a47 Version bump from 0.9.7 to 0.9.8 2017-12-09 20:17:49 +00:00
Michael Nguyen 136f1af8c3 Bugfix/polling fixes (#1296)
* fixed identifier to be unique across all accounts

* now skills will load on http error and skills will upload once to web once identity2 exist

* extracted stuff out of __init__ so that skills work on load and skills get upload when identiy2 exists

* iniatiated class attribute to None
2017-12-08 21:27:06 -06:00
Michael Nguyen 9ca6f89d69 fixed identifier to be unique across all accounts (#1295)
Now composed by user-uuid, settingsmeta-hash and skill-folder
2017-12-08 22:03:34 +01:00
Åke 21f20b9722
Merge pull request #1294 from MycroftAI/bugfix/settings_update_remote
Add missing variables, check settingsmeta
2017-12-08 21:03:57 +01:00
Michael Nguyen c0de5bcaaf added control flow for settings_meta not existing 2017-12-08 12:34:08 -06:00
Michael Nguyen 6c3c64b041 added missing variable fixes 2017-12-08 11:17:54 -06:00
Åke Forslund dd9135cfbb Handle failure in _save_uuid 2017-12-08 15:22:47 +01:00
Steve Penrod 5b960ca20f Reworked documentation at top of file 2017-12-07 17:11:41 -06:00
Michael Nguyen 5b19892de2 added fix for ake 2017-12-07 17:11:41 -06:00
Michael Nguyen cecf4609f0 added language to explain functionality, and fixed some spelling issues 2017-12-07 17:11:41 -06:00
Michael Nguyen dada5b71aa pep8.. 2017-12-07 17:11:41 -06:00
Michael Nguyen 0c430778cc add missing str() transformation 2017-12-07 17:11:41 -06:00
Michael Nguyen 2e561f8a52 namin conventions... 2017-12-07 17:11:41 -06:00
Michael Nguyen e4bfea9cc0 added new public function update and fixed naming conventions 2017-12-07 17:11:41 -06:00
Michael Nguyen 34da54b266 changed doc string language v3 2017-12-07 17:11:41 -06:00
Michael Nguyen 89e78cd37f changed doc string language v2 2017-12-07 17:11:41 -06:00
Michael Nguyen 5802587741 changed doc string language 2017-12-07 17:11:41 -06:00
Michael Nguyen f95aed1ad3 added ability to change settings from device that created the skill settings 2017-12-07 17:11:41 -06:00
Michael Nguyen 2dc5348b93 bug fix 2017-12-07 17:11:41 -06:00
Michael Nguyen f4b8e2b4e1 Global Sync for skill settings
====  Tech Notes ====
Share settings across devices
2017-12-07 17:11:41 -06:00
Steve Penrod 50a5b21482 Rename method for the nitpicky ;) 2017-12-07 16:11:35 -06:00
Steve Penrod 522511e0c6 Extend timeout, randomize repeat announcement
Extended the timeout to longer than the listener default (in case of
operating in a noisy environment).
2017-12-07 16:11:35 -06:00
Steve Penrod 9f3269100b Remove unused 'isfile' import 2017-12-07 16:11:35 -06:00
Steve Penrod b145e149e6 Tweak get_response() doc and behavior
Several minor documentation changes, plus:
* 'cancel' now has to be an exact match
* Cancel events return None instead of the spoken cancelation string
* Reduced timeout to 10 seconds instead of 20
* Changed 'text' to 'announcement' and simplified logic
2017-12-07 16:11:35 -06:00
Matthew D. Scholefield 35d057ff9b Add get_response method as a synchronous alternative to converse 2017-12-07 16:11:35 -06:00
Åke Forslund 41f8c1dcae Move comment regarding to isSpeaking to tts 2017-12-07 15:56:10 -06:00
Åke Forslund d3ecb20e0c Fix bare except, as pointed out by pep8 bot 2017-12-07 15:56:10 -06:00
Åke Forslund 9ed40010fa Fix lock around speech.
the lock could be taken by a waiting thread between sentences in a multi-sentenced utterance. This locking method will allow the entire utterance to be synthezised before handling next.
2017-12-07 15:56:10 -06:00