Commit Graph

1709 Commits (408f0ef4bc5463d0b052797daa559ca3497814ef)

Author SHA1 Message Date
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
Åke 18adeaac96
Merge pull request #1284 from MycroftAI/feature/cli-scrolling-etc
Tweaks for Command Line Interface (CLI)
2017-12-07 20:18:13 +01:00
Åke Forslund 9b0a4d72fe Add "debug" to default config 2017-12-07 10:52:14 -06:00
Åke Forslund 0a0fd8d3c5 Only show reference counting if debugging is set
Since the garbage collection can be on a bit on the slow side it
shouldn't be done at a normal user's device.

A developer can still enable this by setting the configuration flag
"debug" to true.
2017-12-07 10:52:14 -06:00
Åke Forslund 3dde676424 Make reference leak detection more reliable
The reference count sometimes reported that references were remaining
even if they actually weren't. By enforcing a garbage collector run
after shutting down a skill the false possitives are reduced if not
removed all together.
2017-12-07 10:52:14 -06:00
Åke Forslund 15821fad25 Add lang as parameter to EnclosureReader 2017-12-07 10:25:51 -06:00
penrods fdafab8d63 Edit docstrings to match style guidelines 2017-12-07 01:42:07 -06:00
Matthew D. Scholefield caf26bd8ea Add helper translate methods to MycroftSkill 2017-12-07 01:42:07 -06:00
Matthew D. Scholefield 1fecf64fc7 Add phonetic spelling option to TTS engines 2017-12-06 21:43:53 -06:00
penrods 90d37498f0 PgUp/PgDn correction
The functionality of the PgUp and PgDn buttons was inverted in previous
commit.

Also added support for a ":keycode show" to assist in debugging things like
this, plus dropped support the "555" and "500" support which aren't obvious
why they were implemented in the first place.  If users encounter problems
under different terminal emulators or whatever, we can use ":keycode show"
to track it down.

Finally, made the inital refresh occur in 1s to clean up any screen
corruption created by messages put out from import of packages at startup.
2017-12-06 14:52:31 -06:00
penrods e5c91a55d1 Tweaks for Command Line Interface (CLI)
Several minor changes to the CLI:
* Placed lock on screen refresh from a new log message
* Slowed frequency of mic updates to limit opportunity for screen corruption.
  Still happening occasionally, which is vexing.
* Up/Down arrow now scroll logs by a single line
* Ctrl+P/Ctrl+N (Previous/Next) now scroll through the command history
* Ensured that the "Oldest" line is always the first in the log
2017-12-06 04:33:11 -06:00
Åke 68c1683dd7
Merge pull request #1281 from MycroftAI/feature/wifisetup-rework
Modifications for wifi-setup rework
2017-12-06 11:11:18 +01:00
Åke deb2b56464
Merge pull request #1280 from MycroftAI/feature/default-intent-name
- Add support for unnamed intents.
- Add more debugging information for skill handler errors
- Clean up skill name for pronounciation
- Update docstring for initialize method
2017-12-06 11:08:27 +01:00
penrods 4555e3f697 And a PEP8 error... 2017-12-06 03:57:56 -06:00
penrods 49062bfa59 Fix based on review, improve error handling
Corrected my refinement after a previous review.

Also added support for splitting the name of a skill before running it through
TTS, making "VolumeSkill" sound like "Volume Skill" and such.  Plus a log
message before raising some errors in the skill wrapper.
2017-12-06 03:55:54 -06:00
Åke e00b9e4e0e
Merge pull request #1283 from MycroftAI/feature/fix-isspeaking
Fix the timing of isSpeaking signal
2017-12-06 10:47:40 +01:00
Åke Forslund 4018c550c1 Add mycroft.awoken message
Instead of speaking directly from the listener send a message that the
naptime_skill can use to trigger speech and/or other indications that
the listener is awake
2017-12-06 03:42:43 -06:00
penrods 706e516cb4 Fix the timing of isSpeaking signal
The isSpeaking signal would only be generated when the actual audio playback
started, but this could be several seconds for TTS engines like Mimic which
take some time to generate the audio file for playback.  This changes the
creation of the "isSpeaking" signal to the start of the execute() method,
which should queue up audio and leave the signal set until the queue has
eventually been cleared.
2017-12-06 02:31:10 -06:00
penrods 0ca157685c Refined comments and made implementation more Pythonic 2017-12-05 17:57:28 -06:00
Matthew D. Scholefield 0f9df9efa0 Modifications for wifi-setup rework 2017-12-05 17:47:00 -06:00
penrods 553b95643e Add support for unnamed intents
This allows skill writers to ignore naming intents.  Combined with a
forthcoming change to Adapt that creates a default of None for IntentBuilder()

This allows the current:
    @intent_handler(IntentBuilder("CurrentWeatherIntent").require(
        "Weather").optionally("Location").build())
    def handle_current_weather(self, message):
        ...

To become:
    @intent_handler(IntentBuilder().require("Weather").optionally("Location"))
    def handle_current_weather(self, message):
        ...

Which will automatically name the Intent "handle_current_weather".

Also dropped the log message in the default initialize() method since it is
common to not override it now.
2017-12-05 11:18:12 -06:00
Matthew D. Scholefield 7f7d8f703c Fix skill metrics 2017-12-01 15:17:40 -06:00
JarbasAI 53481a265d allow phonemes in any lang (#1264)
Add possibility to set language per hotword. If not specified will use global language setting.
2017-11-29 10:56:35 +01:00
Åke Forslund ab93ee5fc9 Allow spaces around key in dialog template file 2017-11-28 22:57:34 -06:00
jarbasai ed660183f0 ibm watson tts 2017-11-26 21:00:17 +00:00
devs-mycroft 8a2595e85c Version bump from 0.9.6 to 0.9.7 2017-11-24 15:45:13 +00:00
Åke Forslund 6083cbce07 Handle ConnectionError when retrieving user id
If the machine is not connected to the network getting the user uuid in MutableMic.__init__ will fail, raising ConnectionError. This caused the speech client to crash.

Adding handler for ConnectionError resolves this issue.
2017-11-24 10:54:36 +01:00
Åke ec1fdf928d
Merge pull request #1253 from forslund/bugfix/unicode-encoded-dialogs
Fix handling of unicode strings in dialog renderer
2017-11-23 17:44:34 +01:00
Åke Forslund dd9ffbac8f Fix handling of unicode strings in dialog renerer 2017-11-23 14:16:04 +01:00
Matthew D. Scholefield be638de12b Add general metrics 2017-11-22 23:39:14 -06:00
gaurav 3a40014122 Issue-1227 Fix arg =[] and ={}
Issue-1227 fixed line length

Issue-1227 fixed pep 8 E124

Issue-1227 fixed formatting
2017-11-22 23:17:16 -06:00
Augusto Monteiro 2bcfd9fde9
Merge pull request #1218 from forslund/bugfix/messagebus-send-ioerror
Handle missing messagebus in a correct way
2017-11-22 22:03:31 -05:00
Augusto Monteiro 3f281e83b5
Merge pull request #1251 from forslund/feature/reduce-config-file-loading
Reduce unneccessary loading of configuration files
2017-11-22 22:02:13 -05:00
penrods 8cb1e80bbe Fix viseme bug from PR #1242
I merged code and left out the 'until' value from the api call.  This
corrects that and deals with a missing 'until' cleaner.
2017-11-22 17:08:35 -06:00
Åke Forslund 5571b4d2cd Reduce unneccessary loading of configuration files
====  Tech Notes ====
Configuration.get() was originally thought to take a stack of configuration dicts and merge together into a single configuration dict but can also handle file paths.

The Api() class can't use the RemoteConfig class so it has supplied it's own stack of configuration files to avoid infinite recursion. Previously the files wore converted to dicts before passed into the Configuration which meant that 3 files were loaded even if the information was already cached. This passes the files as file references that will only be converted to dicts if the cache is not found.
2017-11-23 00:02:02 +01:00
Michael Nguyen 689687ef60
Merge pull request #1249 from MycroftAI/feature/namless-label
Allow name-less label in settingmeta.json
2017-11-22 16:07:16 -06:00
penrods c8a0cffa53 Allow name-less label in settingmeta.json
A type='label' field in the settingmeta.json might not have a field name,
which was causing a crash.
2017-11-22 15:34:40 -06:00
Åke 799ff1d231
Merge pull request #1248 from MycroftAI/feature/min-wait-time
Increase min wait time in wait_while_speaking()
2017-11-22 20:33:21 +01:00
Michael Nguyen 4c6b57c5c5
Merge pull request #1197 from forslund/feature/audioservice-update
Feature/audioservice update
2017-11-22 13:27:15 -06:00
penrods 55b3f20bf3 Increase min wait time in wait_while_speaking()
In code like this:
   self.speak_dialog("something")
   mycroft.audio.wait_while_speaking()
It was possible that the speaking of "something" would take longer to
start than the 0.1 seconds that was built into the wait_while_speaking().
The definition of this behavior is slightly fuzzy, but this is definitely
a case where the expectation is that previous request for speech would
start and complete.  For now, I have just bumped the minimum wait to
0.3 seconds.

In the long run we might consider tracking specific speak requests and
generating a notification when that request has been serviced.  Then the
skill could automatically hold off until that request has been serviced.
But the basic skill code won't have to change to make this happen, so
this additional sleep is adequate for today.

Also snuck in a minor change to a comment.
2017-11-22 13:21:23 -06:00
Matthew D. Scholefield 0cf5c44f7c Add send_email method to skills 2017-11-22 13:03:50 -06:00
penrods 6463b9a92d Add 'mycroft.mic.listen' messagebus command
Add support for 'mycroft.mic.listen' on the messagebus to trigger the system
to listen for STT processing.  This can be posted on the messagebus by outside
systems, such as a physical or GUI Listen button.
2017-11-21 22:45:12 -06:00
penrods 0b69b056e3 Add support for non-string keys, also
This handles the edge case of things like { 3 : "abc" }.
2017-11-21 11:34:04 -06:00
penrods 88ff31397b Fix dialog renderer
The recent change to remove Pystache introduced a bug in cases where
the passed-in key/value data included non-strings for the value.  This
showed up in the weather skill which passed in "lat" and "lon" as floats.
Now the value is explicitly converted using str().
2017-11-21 11:34:04 -06:00
Åke Forslund 2c3e5c3885 Minor correction of mouth_visime docstring 2017-11-21 12:41:36 +01:00
penrods c1e1b935ee Improve mouth synchronization with speech
When the TTS engine provides visemes to the faceplate, the information
passed along consists of the mouth shape and the duration to display it.
When the system get backed-up for some reason (e.g. the CPU is briefly
overloaded), the code would attempt to catch up the animation but would
still send the 'expired' viseme across the serial port to the faceplate
with no wait-time.  This results in a fast-moving mouth to catch up,
which isn't very pleasing.

Now the viseme is passed along with an expiration date, so if the time
to display it has already passed then the viseme code gets thrown away
instead of being sent across the (relatively slow) serial port.  This
allows better catch-up.
2017-11-20 21:22:48 -06:00
Åke 421c37f572
Merge pull request #1226 from ahayworth/feature-replace-google-tts-with-cloud-speech
Add Google Cloud Speech API STT
2017-11-20 09:53:00 +01:00
Åke ed061df519
Merge pull request #1223 from MycroftAI/feature/improve-metrics-naming
Improve accuracy of metrics naming
2017-11-19 08:19:43 +01:00
penrods 1d4c614a36 Enhance CLI and screen corruption fix
Several refinements:
* Remove the "What time is it" preloaded example
* Page up/down now moves by 1/2 the # visible log lines instead of always 10 lines
* Reduce the frequency of full-screen redraws to 10 secs instead of 5 (because less needed with the corruption fix)
* Add the version of mycroft-core in the upper-right corner
* FIX: screen redraw now uses a lock, preventing corruption from drawing simultaneously from multiple threads
2017-11-17 19:25:16 -06:00
Matthew D. Scholefield b4226ff27b Remove pystache
On certain platforms it escapes quotes which causes problems. Since we only use it for something as simple as key value replacements, it doesn't make sense to include it as a dependency
2017-11-17 01:36:40 -06:00
Andrew Hayworth 6325c7ae7b Add replacment for Google TTS via Google Cloud Speech API
As noted on the Chromium Dev How-to [1] and on the
SpeechRecognition library docs [2], the Google TTS API
is really not the right API to call. While it's simple,
and allows you to authenticate via a simple token, it is
also limited to a max of *50* requests per day.

That's not a lot. I don't think many people will find that
useful, outside of quick testing (if they can even get an
API key - I couldn't figure out how to generate one that
worked correctly).

This commit introduces a new STT backend, google_cloud, so that
the Google STT backend can be deprecated eventually. To do so, we
needed to:
- Install the Google API Client Library
- Create a new STT class which knows how to turn a provided Google
  JSON credentials file into a string (the SpeechRecognition library
  expects you to pass in the JSON string, not a file path, nor an object).

Any person wishing to use this will need to:
- Enable the Cloud Speech API on the Google Cloud Platform console
- Create a new Service Account Key, and download the credentials to
  a secure location
- Configure that location in mycroft.conf, like so:

  "stt": {
    "google_cloud": {
      "credential" {
        "json": { contents of downloaded credentials }
      }
    }
  }

It's worth noting that the Cloud Speech API has a free quota of
60 minutes per month, which would probably stretch further than 50
individual requests. So for hobbyists, it should be nothing but
a net benefit.

[1] http://www.chromium.org/developers/how-tos/api-keys
[2] https://github.com/Uberi/speech_recognition/blob/master/reference/library-reference.rst#recognizer_instancerecognize_googleaudio_data-key--none-language--en-us-show_all--false
2017-11-15 22:10:00 -06:00
Matthew D. Scholefield 168a2b660f Improve accuracy of metrics naming
- md5 is consistent across architectures
 - Account ID is now consistent per user. Previously was using the device id
2017-11-15 19:35:53 -06:00
Åke f656373719
Merge pull request #1219 from MycroftAI/bugfix/enable-learn-typo
Fix typo when enabling learn
2017-11-12 15:28:58 +01:00
Matthew D. Scholefield 66540d9a9b Fix typo when enabling learn 2017-11-10 12:34:34 -06:00
devs-mycroft 4bf93486af Version bump from 0.9.5 to 0.9.6 2017-11-10 15:38:51 +00:00
Åke Forslund 1093dc0ef0 Handle missing messagebus in a correct way
==== Tech notes ====
The send script will throw an IOerror exception if the bus service isn't
started. This correctly catches it and emits a single warning.
2017-11-10 15:27:17 +01:00
Åke Forslund bfa26e6916 Fix issues reported by codacy 2017-11-10 10:24:59 +01:00
Åke Forslund 8527074ee3 Refactor audio service
====  Tech Notes ====
- Encapsulate the audio service into a class to reduce the number of
global variable.
- Remove redundant code
2017-11-10 10:24:59 +01:00
Åke Forslund 441436adbf Add queue command to audio service
==== Tech Notes ====
queue command will start playback if no playback is running.
mpg123 and vlc services updated support queueing tracks while playing

==== Protocol Notes ====
mycroft.audio.service.queue message added
2017-11-10 10:24:59 +01:00
devs-mycroft fda6b98fd5 Version bump from 0.9.4 to 0.9.5 2017-11-10 05:46:21 +00:00
Åke 01d47fb849
Merge pull request #1199 from MycroftAI/feature/precise
Precise Wake Word Listener
2017-11-09 21:27:46 +01:00
Matthew D. Scholefield ec223dcec9 Add wake word module hash to filename 2017-11-09 13:58:44 -06:00
Åke Forslund bcd88c07ce Move session config from global scope
====  Tech Notes ====
As soon as mycroft, mycroft.api or mycroft.skills.core were imported the
configuration was loaded (including reaching out to the web config).
This will reduce unneccessary configuration loadings and make it easier
to handle configuration in the tests.
2017-11-09 13:55:38 -06:00
Åke Forslund b08cf2bf42 Add tests for creating pocketsphinx hotwords
Default to pocketsphinx when hotword config doesn't hit a predefined
hotword config
2017-11-09 13:54:48 -06:00
Matthew D. Scholefield ed1deeb259 Make bool assignment more concise 2017-11-09 13:36:03 -06:00
Matthew D. Scholefield 5694b7f645 Extract precise server settings into config file
This allows changing the server in the future without an upgrade
2017-11-09 13:36:03 -06:00
Matthew D. Scholefield 788dc5d492 Fix downloading precise every startup 2017-11-09 13:36:03 -06:00
Matthew D. Scholefield b3f11d849a Add Precise hotword engine 2017-11-09 13:36:03 -06:00
Åke 15c4c94a71
Merge pull request #1207 from MycroftAI/bugfix/record-length
Fix wake word record length
2017-11-09 19:38:22 +01:00
Matthew D. Scholefield 0dc3dc1eab Fix sec_to_bytes 2017-11-09 11:30:30 -06:00
Matthew D. Scholefield d67f8b4bcf Change unit back to milliseconds and length back to 120ms 2017-11-09 11:30:30 -06:00
Matthew D. Scholefield 18690d358e Add user id to wake word upload
This is used to remove data retroactively from dataset
2017-11-09 11:30:26 -06:00
Åke Forslund 7699da9b84 Minor corrections of settings docstrings 2017-11-09 13:43:04 +01:00
Åke Forslund 8da1589ce2 Fix pep8 issues 2017-11-09 13:24:42 +01:00
penrods bf61cae4de Add optional skill announcement message
A Skill can now implement the get_intro_message() method, which can return a
string to be spoken the very first time a skill is run.  This is intended to
be an announcement, such as further steps necessary to setup the skill.

Also stopped generation of the Error message when the expected StopIteration
occurs on a intent failure.  This confused new developers and poluted the logs.

Finally, corrected some documentation typos.
2017-11-09 04:34:00 -06:00
Matthew D. Scholefield dba2c540af Fix wake word record length 2017-11-08 14:21:07 -06:00
Åke a6cbe4539e
Merge pull request #1195 from akailash/dev
Adding a stop() function to audioservice.py
2017-11-08 00:02:37 +01:00
Michael Nguyen 864128c9c4
Merge pull request #1196 from forslund/bugfix/missing-config-import
Configuration system corrections
2017-11-07 16:32:47 -06:00
Åke Forslund 9ce3c32688 Allow loading config directly from strings
====  Tech Notes ====
Before the refactoring of the configuration system the
ConfigurationManager allowed loading config files directly from strings.
This commit restores that functionality
2017-11-07 13:28:46 +01:00
Åke Forslund 9e67ba5614 Fix incorrect reference in patch 2017-11-03 09:38:09 +01:00
Åke Forslund 9050bad696 Add some more docstrings 2017-11-03 08:10:12 +01:00
Åke Forslund 3004aada98 Add test cases for EventScheduler class
====  Tech Notes ====
- Add test cases
- Slight refactoring of EventScheduler class to make it easier to test
2017-11-03 08:10:12 +01:00
Michael Nguyen 28e0ae9200
Merge pull request #1198 from MycroftAI/bugfix/active-skills
Fix Padatious problems
2017-11-02 16:56:35 -05:00
Åke 572f591a32
Merge pull request #1193 from MycroftAI/feature/status_event_scheduler
Feature/status event scheduler
2017-11-02 21:25:29 +01:00
Matthew D. Scholefield 9d9d615904 Increment Padatious version to 0.3.7 2017-11-02 15:21:47 -05:00
Michael Nguyen 228758975d fixes 2017-11-02 14:57:13 -05:00
Michael Nguyen 369de8a4d2 added error handling and changed function names to be more expressive 2017-11-02 12:34:05 -05:00
Åke Forslund f291e2704a Add missing inflection import
====  Tech Notes ====
inflection was not imported in configuration
2017-11-02 16:19:52 +01:00
Anu 482f1b1619 Fix #1194 2017-11-02 08:57:54 +09:00
Matthew D. Scholefield 384c66cbd2 Fix active skills for Padatious 2017-11-01 16:55:07 -05:00
Michael Nguyen c80a320a5f removed unused import 2017-11-01 12:41:51 -05:00
Michael Nguyen d5473c09c2 removed self reference, added timeout and raise excewption on timeout 2017-11-01 12:37:07 -05:00
Michael Nguyen a7596988a7 added mechanism to query event status 2017-10-31 19:27:58 -05:00
Michael Nguyen b7844df596 bug fixes 2017-10-31 12:54:24 -05:00
devs-mycroft a9d627c979 Version bump from 0.9.3 to 0.9.4 2017-10-30 18:40:54 +00:00
devs-mycroft bc995ad557 Version bump from 0.9.2 to 0.9.3 2017-10-30 18:40:38 +00:00
Michael Nguyen f9ce4f5358 made variables more expressive 2017-10-30 08:17:46 -07:00
Michael Nguyen 1d14929590 Added remove_event skills/core.py
====  Tech Notes ====
This allows you to remove message bus messages inside core.py. When canceling scheduling events, the message bus messages were not removed which could caused duplicate listeners and handlers for the same intent. Adding remove_event function removes the actual messages from the bus to prevent potential duplicates.
2017-10-30 08:13:44 -07:00
Åke 0afc56beeb
Merge pull request #1183 from MycroftAI/feature/quiet-no-internet
Fix no-internet prompt
2017-10-28 10:24:15 +02:00
Åke Forslund 92f25f2922 Remove Location as a default context word
====  Tech Notes ====
Location was added as a default context keyword when the context manager
was added as an example of how the context feature could be used.
However in the current greedy implementation in can cause some confusion
with lingering context providing incorrect Location.

The feature can still be turned on in configuration if someone wants to
experiment with it.
2017-10-28 03:21:02 -05:00
penrods 0986df6b4b Fix no-internet prompt
The prompt during skill downloads was occurring even when the "speak" flag was
set to False.  Now it is honored.

Also removed the "no network connection.dialog" which essentially was a copy of
the "not connected to the internet.dialog" file.
2017-10-28 03:14:22 -05:00
Åke 156ea867a0
Merge pull request #1180 from MycroftAI/feature/clean_log
Cleanup of CLI filters and logged messages
2017-10-28 10:00:30 +02:00
penrods f8824aab1d Cleanup of CLI filters and logged messages
This cleans up the amount of noise in the logs:
* Removed logging of the serial port raw read/writes.
* Removed the "Setting active skill" log in display_manager.py
* Corrected typo "dispaly"
* Added default CLI filter for mouth.display and mouth.icon messages
* Fixed bug when adding new filters
2017-10-28 01:42:19 -05:00
penrods 147bbd2dd7 Fix for Configuration.get()
Several more Configuration.get() mistakes corrected.
2017-10-28 01:41:39 -05:00
penrods 433729a62f Fixes for startup when not paired
Several attempts to connect to the backend fail before pairing has
been completed, which was producing errors that prevented the
messagebus and audio services from starting up.

Now the DeviceApi().is_subscriber property returns False if the
check fails, assuming unpaired == not subscribed.

Also stopped logging the call stack on the HTTPError exception, it
made an expected situation look like a major crash.
2017-10-27 21:06:08 -05:00
Åke 9021e6bcac
Merge pull request #1177 from MycroftAI/feature/fix-pt-pt-1049
Fix PEP8 and remove failing unittests added in PR 1049
2017-10-28 01:04:21 +02:00
Åke Forslund 574d66802c Minor cleanup.
- Remove print statements
- Fix syntax error
2017-10-27 17:39:28 -05:00
Åke Forslund c328bacf5f Quit current app before starting new playback
====  Tech Notes ====
Before the current chromecast application was quit when mycroft was started which caused some interference. Now the current app is quit right before starting playback on the device instead.
2017-10-27 17:39:28 -05:00
penrods 72dbf83835 Fix PEP8 and unittest errors from PR 1049
PR 1049 introduced several cosmetic PEP8 errors that were easily fixed.
Additionally there are unittests that include non-ASCII characters which are
failing.  As Pt-PT support is a work-in-progress, I just commented them out
with TODOs next to them.
2017-10-27 17:39:05 -05:00
penrods 081da75fd5 Fix pep8 error 2017-10-27 17:14:02 -05:00
penrods e80029c1b9 Handle 'None' more gracefully in exception
The exception handler was generating a secondary warning when executing with
a None value for the serial port.
2017-10-27 17:14:02 -05:00
penrods d6b24af14c Fix enclosure client broken by #1110
Syntax error, needed Configuration.get().get("enclosure")
instead of just Configuration.get("enclosure")
2017-10-27 17:14:02 -05:00
Jarbas e189dd97d9 Pt-PT translation (#1049)
Portuguese translation helpers!
2017-10-26 19:18:00 -04:00
Åke Forslund 0bf3d9a668 Clear cache after playback.
====  Tech Notes ====
Since the playback now is performed in a thread the curate_cache could
clean out generated speech before or in the middle of playing back the
queue.
2017-10-26 18:05:57 -05:00
Åke Forslund d4da6d1739 Add minimum diskspace for curate_cache
==== Fixed Issues ====
#1141

====  Tech Notes ====
Curate cache now only removes cache files if the diskspace is below the
set percentage AND if below a set amount of free disk space
2017-10-26 18:05:57 -05:00
Åke Forslund 1f4c98f29c Fix PEP-8 2017-10-26 19:02:32 -04:00
Åke Forslund 52a89327fe Fix storing settings in enclosure client
====  Tech Notes ====
- Fix save in enclosure client
- Add tests for save and merge
2017-10-26 19:02:32 -04:00
Åke Forslund 4e6fa64033 Add comptibility for old ConfigurationManager
====  Tech Notes ====
For example skill-installer references ConfigurationManager directly and
would fail if the old class isn't available
2017-10-26 19:02:32 -04:00
Åke Forslund b067e31e54 Fix failing travis and codacy
====  Tech Notes ====
- removed old main.py
- replace reference to ConfigurationManager in api tests
- reset configuration after use in configuration test
- Pep-8 issue
2017-10-26 19:02:32 -04:00
Åke Forslund 3e878bd59f Replace ConfigurationManger with Configuration 2017-10-26 19:02:32 -04:00
Åke Forslund ea020eab4f Refactor configuration handling
====  Tech Notes ====
- Rewrite of configuration module. Reduced number of calls and simplified
logic.
- Patched configs now survives reload of config
2017-10-26 19:02:32 -04:00
Matthew D. Scholefield 8dc1dd5ab4 Increment Padatious to 0.3.6
Fixes issue registering entities
2017-10-26 18:59:17 -04:00
Åke Forslund 45af24db54 Only stop speech is there's any
==== Fixed Issues ====
If stop speech happened while no speaking was happening the following
utterance was lost.
2017-10-26 18:48:47 -04:00
Åke Forslund 7814e207d3 Fix sending message in stop_speaking()
====  Tech Notes ====
Previous approach did not work as websocket client was not running, this
uses the standalone send functionality recently added to send a single
message.
2017-10-26 18:48:47 -04:00
Åke Forslund e5f2e3d5cd Download subscription voices in the background
====  Tech Notes ====
Subscription voices are downloaded in the background as soon as mimic_tts
module is started.
2017-10-26 18:42:19 -04:00
Åke Forslund 6af06d4433 add missing get_arch() 2017-10-26 18:42:19 -04:00
Åke Forslund 3deb65b0c2 Update download method
====  Tech Notes ====
- Fix cleanup
- Add support for custom header
- create directory as needed
2017-10-26 18:42:19 -04:00
Åke Forslund 7990e168c8 Properly get link for premium voice
====  Tech Notes ====
Add the implemented endpoint for getting the download link for premium
voices.
2017-10-26 18:42:19 -04:00
Åke Forslund 285b4b6c14 Use wget to download, so resume/retry can be used
====  Tech Notes ====
Since the voice is a quite large download stalling download is a real
possibility. Using wget allows for resume and retry of download in a
simple way.
2017-10-26 18:42:19 -04:00
Åke Forslund 46c1b575fd Add methods for downloading premium voice
====  Tech Notes ====
- Using download utility to download voice binary
- reverts to default voice if not premium
- uses default voice during download and switches over when done
2017-10-26 18:42:19 -04:00
devs-mycroft 2b72ea9366 Version bump from 0.9.1 to 0.9.2 2017-10-24 17:12:20 +00:00
mycroft-developers ee565482fd Revert version number 2017-10-24 11:14:55 -05:00
devs-mycroft d7c08d6e5f Version bump from 0.9.1 to 0.9.2 2017-10-24 16:13:15 +00:00
Arron Atchison be936a4003 Manual version revert 2017-10-23 16:54:16 -05:00
devs-mycroft 60d71408a4 Version bump from 0.9.1 to 0.9.2 2017-10-23 16:51:15 -05:00
Matthew D. Scholefield a7c9e2d525 Fall back to default wake word on invalid config
Also format to lowercase to prevent decoder error if wake word has capitals
2017-10-20 12:18:56 -05:00
Åke 5d1f67c40e Merge pull request #1169 from roadriverrail/https_audio
Add https support to audio service and fix searching through available backends.
2017-10-19 09:38:20 +02:00
Arron Atchison ecb93d0627 version bump to 0.9.1 2017-10-18 13:58:22 -05:00
Rhett Aultman ad0b637856 Add https support to audio service
The audio service could not handle https URLs.  VLC can support them,
so https was added to its supported_uris.  Additionally, the play( )
function in the audio service could not actually correctly search the
backends for a supported uri, so the code there has been fixed
2017-10-18 11:39:18 -04:00
Michael Nguyen 0f00b8e7ce Merge pull request #1166 from forslund/bugfix/listener-queue-timeout
Fix timeout of self.queue.get() in consumer
2017-10-17 15:04:54 -05:00
Åke Forslund e2666b46ed Fix timeout of self.queue.get() in consumer 2017-10-17 21:54:33 +02:00
Matthew D. Scholefield 2177270d57 Return if audio is None in listener 2017-10-17 14:42:16 -05:00
penrods e1b4ad0400 Fixed silly typo... 2017-10-16 19:20:22 -05:00
penrods 47e2df1722 Prevent the "rolling eye" syndrome
When (re)booting a Mark 1 unit will show rolling eyes until it reaches
a "ready" state.  This happens by sending a command to the Arduino.
There is also code that prevents sending commands our the serial port
if not running on a Mark 1.  In certain situations, the message
indicating that the Mark 1 Arduino was found was posted to the
messagebus before it was fully open.  When this was missed, the system
didn't think it was on a Mark 1 and the command to stop the eyes from
rolling (and for further interactions with the Mark 1 hardware) were
not sent.

The Mark 1 Arduino detection is now triggered when the messagebus
'open' notification is generated rather than when the object is
constructed.

==== Fixed Issues ====
#967 - Eyes never stop spinning on startup (Mark 1)
2017-10-16 19:20:22 -05:00
Michael Nguyen b82d11e5a4 Merge pull request #1159 from MycroftAI/bugfix/listener-reload
Add timeout to consumer queue get
2017-10-16 18:04:16 -05:00
Åke Forslund 84e47fb25f Fix reloading skills system
==== Fixed Issues ====
One exemple is reloading pairing skill after skill update (30-60 seconds)
results in a new pairing code being generated.

====  Tech Notes ====
Now compare individual skill modification dates and not a global last
modified skill.
2017-10-16 17:54:03 -05:00
Matthew D. Scholefield b53e0bb202 Add timeout to consumer queue get
Prevents hanging on config reload
2017-10-16 16:05:01 -05:00
penrods 8c696b0586 Issue #967 - eyes keep spinning on boot
This fixes at least a potential issue with the Mark 1 boot sequence.
The system posts a "system.version" message then registers a
listener for the response.  There is a chance that the response
sneaks in before the handler is registered.  This just reorders the
sequence of that code.

==== Fixed Issues ====
ISSUE #967 - Eyes never stop spinning on startup (Mark 1)
2017-10-15 12:27:55 -05:00
Åke Forslund 131b10e0fc wait for msm lock to be free before loading skills
====  Tech Notes ====
The msm lock wasn't checked before reloading skills allowing skills to be loaded before msm wasn't finished installing requirements.

A check was added to ensure this along with a separate lock enforcing the handling of block_msm and release_msm in the correct order. If not the update procedure could cause a deadlock.
2017-10-15 11:30:57 -05:00
Åke Forslund f70588cab7 Add message parameter to methods connected to ws 2017-10-15 11:30:57 -05:00
Michael Nguyen f6ee33a90e formatting fixes 2017-10-13 18:09:20 -05:00
Michael Nguyen f68be2a72c added safety net for null values in get settings 2017-10-13 18:09:20 -05:00
Åke 3e8b366642 Merge pull request #1151 from MycroftAI/feature/skill-settings
improved skill settings
2017-10-13 23:16:00 +02:00
Michael Nguyen 2623cb8cca added is_alive 2017-10-13 16:06:07 -05:00
Michael Nguyen 157c113678 fixed timer bug 2017-10-13 13:43:55 -05:00
Åke Forslund b40e03d859 Fix update interval after success
The interval was previously not updated after success (unless speak was set to
true). This caused the skills to continuously update.

Also set speak = false as default since that's the most commonly used
case right now.
2017-10-13 15:53:10 +02:00
Åke Forslund 7c0a3b2fe5 Fix codacy warnings. 2017-10-13 11:22:01 +02:00
penrods 3d64509b25 SkillManager, msm messagebus notifications
Significantly reworked the loading/updating of Skills.  Unified
all management under a single SkillManager class.  This class
runs as a thread that initially loads, upgrades (via MSM)
and reloads skills.

Removed the independent threads that were being run.  The skill
updating still happens once an hour, but works in conjunction
with the scan to reload modified skills.  Also added messagebus
notifications from MSM so mycroft-core can pause reloading
skills until the installation is complete.

Added a new mycroft.messagebus.send module to allow command
line interaction with the messagebus, e.g.:
   python -m mycroft.messagebus.send mycroft.wifi.start
   python -m mycroft.messagebus.send speak '{"utterance":"hello"}'

==== Fixed Issues ====
MSM installs that have PIP dependencies were failing, as the
load would occur after code was retrieved but before PIP install
completed.  Restart was required to load new skills.

====  Tech Notes ====
TODO: Change the way we manage modules.  The auto-load of the
remote configuration for the module is silly, slow and wasteful.

I made the WebsocketClient.build_url() method static in
anticipation of being able to do this more efficiently when the
submodule load doesn't hit the remove API automatically.

==== Localization Notes ====
Modified 'sorry I couldn't install default skills' message.

==== Protocol Notes ====
MSM now generates:
  msm.updating
  msm.installing
  msm.install.succeeded     { "skill" : name }
  msm.install.failed        { "skill" : name, "error" : code }
  msm.installed
  msm.updated
  msm.removing
  msm.remove.succeeded      { "skill" : name }
  msm.remove.failed { "skill" : name, "error" : code }
  msm.removed

An update can now be forced by posting 'skillmanager.update' to the
messagebus.
2017-10-13 02:21:58 -05:00
Michael Nguyen 614cc57d01 made some changes 2017-10-12 14:36:23 -05:00
Michael Nguyen cec098c442 update docstring 2017-10-12 13:32:50 -05:00
Michael Nguyen f3dacfb204 ==== Tech Notes ====
added capability to auto upload changes from settingsmeta.json to home.mycroft.ai

====  Documentation Notes ====
If a developer make changes to the settingsmeta.json, then this will be auto uploaded to home.mycroft.ai

==== Protocol Notes ====
hash and uuid are now stored as variables in files located in ~/.mycroft/skills/{skill-name}
2017-10-12 12:35:50 -05:00
Augusto Monteiro 'Sparky beaea7557b Fixing random extra space 2017-10-11 14:36:12 -05:00
Augusto Monteiro 'Sparky e39c38ff3c Updating version when device is update 2017-10-11 14:36:12 -05:00
Åke Forslund a5b96ba285 Correct stop_speaking() to handle threaded tts OK
====  Tech Notes ====
Now the stop_speaking() method sends a signal to the speech module to
stop speech instead of killing all aplay/paplay instances
2017-10-10 14:02:18 -05:00
Åke Forslund 0daee0eb53 Fix bug in stop_speaking()
====  Tech Notes ====
stop_speaking would not run properly due to two missing imports
2017-10-10 14:02:18 -05:00
Åke a006a3d5b6 Merge pull request #1120 from MycroftAI/feature/fix-log-autocomplete
Fix log autocomplete

==== Tech Notes ====
Due to the use of setattr(), IDEs like PyCharm couldn't use autocomplete on the LOG class. This unrolls the loop so that the logging attributes appear in the autocomplete menu.
2017-10-07 13:06:15 +02:00
Matthew D. Scholefield ef1a6e24c3 Upgrade padatious to fix travis build 2017-10-06 00:06:08 -05:00
Michael Nguyen 33277fef34 Merge pull request #1132 from MycroftAI/bugfix/padatious-load-vs-add
Padatious fixes
2017-10-05 16:34:45 -05:00
Arron Atchison 896470c18f Update __init__.py 2017-10-05 20:38:39 +09:00
Arron Atchison 2a8aeeb459 version bump to 9.0.0 2017-10-05 20:36:09 +09:00
Åke Forslund ad0e9870c2 Add notifications when starting/stopping recording
====  Tech Notes ====
Add text notifying start and stop of recording
2017-10-04 21:56:02 -05:00
Matthew D. Scholefield b6bc4ee482 Increment padatious version number to 0.3.3
This adds a bugfix for empty containers
2017-10-04 21:50:54 -05:00
Matthew D. Scholefield 43a59b0d88 Fix Padatious to load intents and entities
Doesn't make sense to add intents since no sample lines are provided
2017-10-04 21:45:21 -05:00
Åke 6acc0adb40 Merge pull request #1128 from MycroftAI/feature/to-apache-license
Change to Apache 2.0 license from GPLv3.0
2017-10-04 09:13:40 +02:00
penrods d49ec3616f Fixing PEP8 whitespace errors 2017-10-04 01:44:58 -05:00
penrods 8f2e5d9498 Change to Apache 2.0 license from GPLv3.0
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0.  All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.

Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors.  This cleanly
protects the project, the contributor and all who use the technology
to build upon.

Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/

This commit also removes all __author__="" from the code.  These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear.  Do you remove a name from the list if the
last line of code the wrote gets replaced?  Etc.  Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!

Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."

==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md

====  Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
2017-10-04 01:28:44 -05:00
Åke b850143824 Merge pull request #1117 from forslund/bugfix/inspect-failure
Add workaround for inspect-decorator problem
2017-10-04 07:08:15 +02:00
Matthew D. Scholefield 32ac6a83da Fix Padatious parameter 2017-10-03 19:31:37 -05:00
Augusto Monteiro 7252f5e7dd Merge pull request #1127 from MycroftAI/feature/detect-opt-in
Use opt in value to record wake words
2017-10-03 13:33:40 -05:00
Matthew D. Scholefield 0569ba40f7 Use opt in value to record wake words 2017-10-03 13:24:09 -05:00
Matthew D. Scholefield 403aeb9360 Upgrade Padatious to 0.3.2 which brings in entity support 2017-10-03 12:17:02 -05:00
Åke dfaed4f610 Merge pull request #1119 from MycroftAI/bugfix/fix-save
Fix configuration manager saving

==== Tech Notes ====
Fixes ConfigurationManager.save() method. Previously incorrect use of dict update method resulted in empty config. Now the saved dict is recursively merged to only update affected fields.
2017-09-29 09:45:36 +02:00
Matthew D. Scholefield 9483d0a50e Unroll loop to explicitly show attributes in LOG
This allows IDEs to use autocomplete on the LOG class
2017-09-29 02:01:22 -05:00
Matthew D. Scholefield da448c4bdd Change update to merge_conf
This prevents replacing sub-dicts rather than recursively merging
2017-09-29 01:39:16 -05:00
Matthew D. Scholefield a6709033d4 Remove wifi setup 2017-09-29 15:12:47 +09:00
Matthew D. Scholefield 4c1a0d471b Fix configuration manager saving 2017-09-28 22:29:17 -05:00
Patrick Freeman 4f4547182b issue-1091 - Provide Dutch translations of dialog files 2017-09-28 11:28:45 -05:00
Åke Forslund 605f0640ec Make sure structure for wake word exist before use
==== Fixed Issues ====
#1105

====  Tech Notes ====
Verify that the sub-config for the set wake word exist before writing to
it.
2017-09-28 11:22:41 -05:00
Jarbas f5806b86c5 fallback start, end, failure messages (#1108)
==== Tech Notes ====
Add mycroft.skill.handler.start and mycroft.skill.handler.complete to fallback handler. handler in data field will be called "fallback" upon completion the used handler will be reported in the "fallback_handler" data entry.

* fix

* pep8

* fallback handler name
2017-09-28 17:53:57 +02:00
Åke Forslund 838e2dd7d8 Remove repeating events from saved schedule
====  Tech Notes ====
Repeating events are not saved to make sure repeating events aren't
stacked over and over.
2017-09-28 02:24:34 -05:00
Åke Forslund 5d9574ea4f Reorder canceling and adding event handling
====  Tech Notes ====
If cancel + add event messages arrive at roughly the same time the add
would be overridden by the cancel. More intuitive to handle cancel first
and add new arrived events after.
2017-09-28 02:24:34 -05:00
Åke Forslund 1d0e65dfb1 Fix update_event and cancel_event methods
====  Tech Notes ====
update_event and cancel_event did not use a name unique to the skill
forcing the user to build it themselves. Now the unique name is
constructed in the method _unique_name() for all event scheduling
methods.
2017-09-28 02:24:34 -05:00
Åke Forslund 68a96b40b0 Add workaround for inspect-decorator problem
====  Tech Notes ====
when using multiple decorators on a method inspect will return incorrect
values despite @wraps. This causes the intent handler to fail to
execute.

@decorator can't really be of help here since it doesn't handle
decorators with arguments (as far as I can understand)

This is a workaround using the fact that the argument count will be zero
on methods with multiple decorators, and basically tries the usual
signatures
2017-09-26 19:11:33 +02:00
Åke b13113d76e Merge pull request #1095 from MycroftAI/feature/logger
Add new LOG class
2017-09-21 16:55:44 +02:00
Matthew D. Scholefield e7474ccc29 Fix tornado autoreload error 2017-09-21 09:37:08 -05:00
Matthew D. Scholefield 07e94f2d07 Improve LOG code and add log unit test
Adjusts style for readability and generates methods dynamically
2017-09-20 12:45:22 -05:00
Arron Atchison 85081c00f3 Version bump to 0.8.22 2017-09-19 11:15:20 +09:00
Matthew D. Scholefield 5e392f34aa Optimize imports
Remove unused imports and group local vs external alphabetically
2017-09-18 16:07:50 -05:00
Matthew D. Scholefield cfdc405da5 Add new LOG class 2017-09-18 13:56:06 -05:00
Åke Forslund 23444c65ee Replace Intent invocation with specific messages
==== Protocol Notes ====
New messages on the message bus:
- mycroft.volume.increase
- mycroft.volume.decrease
2017-09-15 12:14:35 -05:00
Åke Forslund f756673bff Start network check faster
====  Tech Notes ====
The network check is now only delayed until priority skills have been
loaded (this includes the relevant pairing skill)
2017-09-15 06:48:39 -05:00