Commit Graph

2688 Commits (979c02158d95ad3cbdd17a14c0f3d6f415ae58fa)

Author SHA1 Message Date
Åke 7032292122
Merge pull request #1747 from MycroftAI/feature/install-beta
Add feature to install beta skills
2018-08-15 21:28:03 +02:00
Matthew Scholefield e26904e814 Add feature to install beta skills 2018-08-15 14:06:12 -05:00
Åke 3099d004dd Fix issue writing phonemes to disk (#1720)
Change Mimic.get_tts() to return phonemes as string instead of bytes
2018-08-15 03:59:11 -05:00
Åke fe1b92f603 Upgrade msm to 0.5.18 (#1741)
Fixes double skill install/update when running msm default.
2018-08-15 03:57:24 -05:00
Steve Penrod 684230213e Set the directory explicitly start-mycroft.sh scripts
Explicitly setting the directory at the beginning of the start-mycroft.sh
and stop-mycroft.sh scripts.  The behaves better if invoked from a
different directory.
2018-08-15 03:50:37 -05:00
Åke 41fec03d80 Add retry limit for chromecast detection (#1729)
Limit the connection tries to 2 and lower the timeout to 5 seconds.
2018-08-15 03:44:24 -05:00
Steve Penrod 2e873e43bf Change to the supported wait_while_speaking() (#1743)
Code was using the deprecated version from mycroft.util instead of
the mycroft.audio version.
2018-08-15 10:35:50 +02:00
Åke 3986d1fbb0 Handle remove_all_listeners (#1742)
Allow the test mocked emitter to handle emitter.remove_all_listeners
2018-08-15 03:32:12 -05:00
Åke f0fbdca32d
Merge pull request #1740 from MycroftAI/feature/better_date_pronounciation
better pronounciation for 4 digit numbers (like years)
2018-08-15 08:55:36 +02:00
Åke 278ab47296
Merge pull request #1738 from MycroftAI/bugfix/cli-wrap-lock
Fix CLI lockup; simple 'speak' support; help display
2018-08-15 08:54:07 +02:00
Michael Nguyen 35134ddaeb fix unit tests for 4 digit number 2018-08-15 00:44:22 -05:00
Michael Nguyen 7b69fb8d46 better pronounciation for 4 digit numbers 2018-08-15 00:31:34 -05:00
Michael Nguyen 14e862bfaa Fix isSpeaking Signal for Mimic2 TTS (#1724)
Allows skills to determine while TTS is still occurring
2018-08-14 23:10:23 -05:00
Steve Penrod 46c92e0c36 Fix CLI lockup; simple 'speak' support; help display
Several minor and simple CLI fixes:
* The CLI was locking up with at Lock() deadlock when rebuilding the
  filtered log.
* The simple_cli() wasn't registering handle_speak() on the websocket,
  even though the handler was setup for it.  The utterances are already
  clear from the Input: line or from the logs being printed, so no need
  to have a handle_utterance() registered in the simple_cli() case.
* Help wasn't refreshing the screen, so was invisible.
* An error could be thrown if Ctrl+Z was hit to suspend the 'fg' to
  return to foreground before any key was pressed.
2018-08-14 22:40:08 -05:00
JarbasAI 65fcfcfcff remove isSpeaking signal on audio startup (#1721)
* remove isSpeaking signal on audio startup

* clean import
2018-08-14 22:07:59 -05:00
Michael Nguyen 408f0ef4bc function to normalized all numbers to text equivalent (#1737)
Numbers are now normalized to the text equivalent. This is to solve problems where mimic2 returns a speed up text generation when saying number values.
2018-08-14 22:01:08 -05:00
Matthew D. Scholefield 6deafe42af
Merge pull request #1727 from juliengk/camelcase
Fix camel case splitting
2018-08-14 16:18:41 -05:00
Matthew D. Scholefield 0a66f90fe6 Upgrade to Padatious 0.4.5 (#1734) 2018-08-14 14:20:06 -05:00
Julien Kassar 24a80d60c3 Fix camel case splitting
Signed-off-by: Julien Kassar <github@kassisol.com>
2018-08-12 14:00:28 -04:00
Dominik aaae168672 some vocab/dialog was added (#1717) 2018-08-10 15:02:56 -05:00
Åke 01c66281f1
Merge pull request #1716 from ndarilek/dev
Better logging around why writing .PHO file fails.
2018-08-09 15:41:13 +02:00
Nolan Darilek adfd9154db Better logging around why writing .PHO file fails. 2018-08-06 20:28:52 +00:00
devs-mycroft 99b00bb776 Version bump from 18.2.11 to 18.2.12 2018-08-04 08:07:42 +00:00
Steve Penrod 609a09bbf3
Allow Padatious to override Adapt (#1713)
Allow a Padatious intent to override Adapt when it is VERY
certain that the utterance is directed at it.  (95% confidence
or greater.)  Right now that only occurs if the intent match
for the given phrase is perfect.

This solves this kind of issue:
* Adapt:  Matching on "Set" and "Alarm"
* Padatious: Handling "is an alarm set"

* Fix logic error for when no Padatious intent
2018-08-03 14:43:17 -05:00
Matthew D. Scholefield d49d991a84 Remove git locks when starting mycroft (#1715)
This is a preventative measure to fix errors with git lock files not being removed when devices are unplugged or processes are killed
2018-08-03 14:41:51 -05:00
Matthew D. Scholefield f8a17c03f7
Merge pull request #1712 from MycroftAI/feature/log-unification
start-mycroft.sh improvements (change log dir and exit 1 when out of date)
2018-08-03 02:14:37 -05:00
Robert Sprunk a70e9f6c3f Replace static /opt/mycroft in prepare-msm.sh (#1700)
Replace static /opt/mycroft to use the environment variable instead.
2018-08-03 00:06:17 -05:00
Steve Penrod 1c82945576 Move logs to /var/log/mycroft/ directory
Simplifies permissions and future log-rotations to have all logs
under a single folder instead of having to give permissions to each.
2018-08-02 23:57:13 -05:00
Steve Penrod d1d17c2e08 Fix accidental line-ending change 2018-08-02 23:34:44 -05:00
Steve Penrod f329051743 Move logs to /var/log in all cases
Previously, the location of the log files changed depending
on whether you were running on a Mark1/Picroft or under a
"Github" install.  Now they are always under the same directory
at /var/log/mycroft-*.log

This also updates the CLI to pull from that location always.

Additionally:
* Removed the nonfunctional 'wifi' option from start-mycroft.sh
* Made the validation for dev_setup.sh exit instead of just show
  a warning message in start-mycroft.sh
* Added code to allow dev_setup.sh to be run from different
  directories successfully
2018-08-02 21:21:30 -05:00
Michael Nguyen fe00294b4c Feature/mimic2 visemse (#1708)
* added ability to create visemes
* clean visemes code, added url to mycroft.conf
2018-08-02 15:08:10 -05:00
Julien Kassar ed556b09df Standardize shell scripts (#1711)
* Standardize shebangs
* Standardize spaces
* Standardize functions declaration
* Standardize conditional constructs
* Standardize double quotes
* Standardize command substitution
* Standardize sed command
2018-08-02 14:48:47 -05:00
Julien Kassar e482254172 Do not enter python virtual env when inside Docker container (#1710)
Using a virtual environment is not necessary under Docker, which is a controlled
environment on its own.  This uses the semi-standard existence check for ```.dockerenv```
as a way to detect when running in a Docker context.
2018-08-01 15:10:48 -05:00
Matthew D. Scholefield a233cf4fd8 Upgrade padatious (#1709)
This upgrades Padatious to include a fix with perfect intent matches. Now any perfect match should output a confidence of 1.0
2018-08-01 15:01:45 -05:00
Michael Nguyen 7b54149bcd
Merge pull request #1653 from JarbasAl/feature/pronounce_scientific
Feature/pronounce scientific
2018-07-31 13:04:14 -05:00
Steve Penrod 040b64d09d
Fix CLI screen corruption (#1704)
The CLI would often have temporary screen corruption.  This reworks
several things to correct that issue, although it looks like the
ultimate cause was drawing to the screen while in the middle of
waiting on a VT100 ESC keycode sequence.

* Rearchitected all screen drawing to run in a single thread.  Now
  call set_screen_dirty() instead of draw_screen()
* Added a lock on accessing the various Log buffers, preventing
  changes to the buffer in the middle of a redraw
* Modified key reading logic when ESC character is received.  Now
  uses a 1 second timeout if no subsequent keycodes are sent
* Catch several special exceptions.  Curses throws exceptions in some cases during get_wch(), such as
when you Ctrl+Z suspend the CLI the resume the process.  Also moved Ctrl+C processing into this exception handler.
2018-07-30 17:17:48 -05:00
Steve Penrod ec73b7d48e
Fix named event scheduling/deleting (#1705)
While working on the Alarm skill I discovered several issues with the
event scheduler.  This PR cleans up those findings and resolves several
other potential issues:

1) To avoid thread synchronization issues, the EventScheduler had several
queues which independently held objects to be added/deleted/updated.  However, the order of the events was undefined and got mixed since they were all batched together.  So, for instance, if skill code performed:
   self.add_event("foo", self.handle_foo)
   if SomeReason:
       self.cancel_event("foo")
The actual order of queue handling would perform Remove first, then Add which resulted in "foo" not being found for delete, but then added and left as an active event.

Now the EventScheduler protects the list using a Lock and the queues have been removed.  Modifications to the list happen immediately after obtaining the lock and are not batched up.

2) One-time events were triggered while the event was still in the EventScheduler list.  Now the entry is removed before invoking the handler.

3) Within the MycroftSkill.add_event(name, handler) is a local 'wrapper' method that actually makes the callback.  The MycroftSkill.remove_event(name) method attempted to find entries in the events list and the associated handler entries in the self.emitter to remove.  However, the emitter actually held the wrapper(handler), not the handler itself.  So the emitter handlers were left behind.

This was a quiet bug until the next time you scheduled an event of the same name.  When that second event finally triggered, it would fire off both the new and the old handler -- which snowballed in the 'skill-alarm:Beep' case, doubling and redoubling with every beep.

Now this cancels all the emitter listeners by name.  There is a very slim chance that someone has registered a listener with the same name, but since it is namespaced to "skill-name:Event" I think this is pretty safe.


Not technically related, but a failure that has been lurking for
some time and is a French unit test that doesn't work depending
on the time of day when the test is run.
2018-07-30 15:08:13 -05:00
Matthew D. Scholefield 017449b3c2
Merge pull request #1707 from MycroftAI/feature/enclosure-in-scripts
Add enclosure to the start/stop dev scripts
2018-07-27 15:49:46 -05:00
Steve Penrod 365d6d19a0 Add enclosure to the start/stop dev scripts
The start-mycroft.sh and stop-mycroft.sh scripts now automatically
run the enclosure client if the platform is defined as
"mycroft_mark_1".

Also corrected a copy/pasted comment and added a clarifying message during the stop when killing a process.

Add stop support for recent 'python3' change

Necessary after #1703

The -r option eliminates the quotes on output

Clean up the usage of jq, -r removes the quotes on output.  Also eliminated the python2 support in the regex ```[p]ython[2|3]``` and dropped the unnecessary ```[p]```.

Verify platform file existence before read

It might not exist on a desktop install.

Verify platform file existence before read
2018-07-27 15:48:08 -05:00
Julien Kassar 670994b804 Replace python with python3 in start-mycroft.sh script (#1703)
Signed-off-by: Julien Kassar <github@kassisol.com>
2018-07-27 01:30:39 -05:00
Josh Cox 2abb8fa74b Add Ogg123 support (#1678)
This is reimplementation of #1649 which became divergent.

## Description
Adds a Ogg123Service and a play_ogg exactly like Mpg123Service and play_mp3

## How to test
I have a skill for a podcast which does not have an mp3 feed:
https://github.com/joshuacox/skill-GNUworldOrder

## Contributor license agreement signed?
signed by @joshuacox
2018-07-26 22:25:39 -05:00
Matthew D. Scholefield 859da51fcc
Merge pull request #1706 from MycroftAI/feature/padatious-warning
Immediately speak warning while Padatious trains
2018-07-26 19:14:51 -05:00
Matthew D. Scholefield 3fbe12cc07
Make single thread log nicer 2018-07-26 18:57:36 -05:00
Steve Penrod 0eb29718f3 Remove commented-out code 2018-07-26 18:27:49 -05:00
Steve Penrod edc6ab1ed6 Immediately speak warning while Padatious trains
At startup, Padatious was blocking in the fallback while the
training occurred.  As a result, any attempts to use Mycroft
during that period would queue up rather than giving the
user feedback.  Now it immediately returns False, allowing
user notification to occur elsewhere.
2018-07-26 18:21:48 -05:00
Åke 9ae13be1d4
Merge pull request #1698 from MycroftAI/feature/upgrade-mycroft-deps
Upgrade mycroft-authored dependencies
2018-07-24 09:45:13 +02:00
Matthew Scholefield 67714e846e Upgrade mycroft-authored dependencies 2018-07-20 17:43:27 -05:00
devs-mycroft 9ad7bf79a3 Version bump from 18.2.10 to 18.2.11 2018-07-19 14:02:03 +00:00
Åke 1da82bdd95
Merge pull request #1696 from forslund/bugfix/padatious-wait-and-train
Fix updating padatious intents after intent load/reload
2018-07-19 14:19:50 +02:00
Åke Forslund b60320bcae Fix updating padatious intents after intent reload
Training is called from wait_and_train with None as message, this commit adds propper handling for this case.
2018-07-19 14:06:58 +02:00