Commit Graph

2870 Commits (32a3860bce07c8e647310ebc68b51c325f92f02c)

Author SHA1 Message Date
Åke 1d4297d33c Remove announcement parameter from get_response (#1758)
MycroftSkill.get_response() now uses the dialog parameter as either a literal string or a dialog
filename.
2018-08-26 01:56:26 -05:00
Åke 3334316c63 Add MycroftSkill.voc_match (#1719)
The method first tries to use the skill vocab directory and then tries
the mycroft/res/text... directory.

After the vocab is loaded from file once it's stored in a cache
dictionary and further uses of the method won't hit the disk.

Example:
   if self.voc_match(utt, "Yes):
       ...
2018-08-24 20:14:44 -05:00
Åke b85758a179 Make dialog loading more strict (#1692)
While creating dialog files temporary files may be loaded and confuse
skill creators.
2018-08-24 19:45:26 -05:00
Åke 0d14e01907 Fix skills listing in CLI (#1759)
Skills list shared the help screen id it was immediately overwritten by
the help.

- Give the skills page a separate page number
- Replace screen id numbers with simple identifiers
- Add simple handling of multiple pages
2018-08-24 00:03:32 -05:00
Michael Nguyen b3c767d912 Web setting typecasting
The initial implementation of web settings returned values as
strings all the time, even Boolean and numeric values.  This
required unnecessarily complicated code, such as:

```python
    if setting["show_time"] == "true":
        # do whatever...
```

Now a value defined in metadata as a "checkbox" gets cast to a boolean,
and values defined in metadata as a "number" is typecast to int or
float, as appropriate.  This allows cleaner code such as:

```python
    if setting["show_time"]:
        # do whatever...
```

NOTE: This can be a breaking change, verify you skill which uses 'checkbox'
webUI types handles this correctly for 18.08.
2018-08-23 23:22:13 -05:00
Åke Forslund a180672db5 Minor update to service loading testcase 2018-08-23 09:50:30 +02:00
Åke Forslund c4afe7429a Rename emitter "bus" for consistency 2018-08-23 09:03:53 +02:00
Åke Forslund 7b4c6ed583 Audio service mimetypes
Add possibility for mimetypes to be passed with each track.
Make simple audio service try to detect mime type if missing
2018-08-23 08:41:01 +02:00
Josh Cox c57fcfe328 Add Simple audio backend
Uses simple command line tools to play audio. This replaces the mpg123 and the pogg123 backends.
2018-08-23 08:41:01 +02:00
Åke 4aac668a2f Remove depreciated ScheduledSkill (#1731)
- remove the scheduled_skills module
- remove the time_rules module
- remove parsedatetime requirement (only used in scheduled_skills)
2018-08-21 20:53:52 -05:00
Åke 64476eb143 Replace emitter/ws with bus (#1757)
Makes the code a bit more understandable
2018-08-21 20:50:50 -05:00
Åke 3d18df3d6d Add support for separate settings for test (#1753)
The json can now include a "settings" entry which will replace the skill's self.settings for that particular test.
2018-08-21 20:50:06 -05:00
Åke bc0dec4719
Merge pull request #1756 from MycroftAI/feature/remove-extractnumber
Remove deprecated extractnumber
2018-08-21 21:28:47 +02:00
Matthew D. Scholefield c138fda79e
Merge pull request #1725 from forslund/feature/__main__
Feature/__main__
2018-08-21 10:29:13 -05:00
Åke Forslund b7e1cb835c Fix broken test
- update test_parse*
- correct the reference in mycroft.util
2018-08-21 11:57:12 +02:00
Åke ea2ef5d3cd
Merge pull request #1755 from MycroftAI/feature/enhance-tester-output
Enhance tester output
2018-08-21 11:27:45 +02:00
Steve Penrod 51b60398a3 Remove deprecated extractnumber
Removing the deprecated mycroft.util.parse.extractnumber(), use extract_number() instead.
2018-08-21 04:06:34 -05:00
Steve Penrod 6dc46e8c0c Enhance tester output
Several visual changes to the logs (no functional difference)
* Added 'with' to close test_case_file, quieting warning
* Highlight Mycroft's utterannces in output and moved print to fix order of printing
* Better highlight sending a response
* Highlight the test utterance
2018-08-21 04:03:03 -05:00
Åke 6b234359dd
Merge pull request #1752 from MycroftAI/feature/remove-API-find
Remove deprecated API.find*() methods
2018-08-19 22:39:43 +02:00
Steve Penrod 31f09af745 Remove deprecated API.find*() methods
The API.find/find_setting/find_location() methods were replaced by
API.get/get_setting/get_location() some time ago.  Permanently removing
the deprecated functions.
2018-08-19 15:16:18 -05:00
Åke 4e8972669f
Merge pull request #1750 from MycroftAI/bugfix/removing-scheduled-events
Fix removing scheduled events
2018-08-17 12:35:53 +02:00
Steve Penrod 6838e10965 Fix removing scheduled events
The list holding the names of scheduled events was being populated with decorated names,
but other code assumed it held the "friendly" name.  Corrected this assumption.

Several locations also removed list entries while iterating on the same list, resulting
in entries being skipped and left un-deleted.  This left behind phantom scheduled events
when skills were reloaded, goofing up many schedules after the reload.
2018-08-17 04:48:34 -05:00
Åke Forslund b41d9edc13 Split text client from __main__
- __main__.py keeps the main setup of hiding stderr/out and argument parsing
- text_client.py contains the actual text client
2018-08-16 20:54:05 +02:00
Åke Forslund b03e0336ca Move SkillManager from __main__ to separate file 2018-08-16 20:53:27 +02:00
Åke Forslund 6fa17dbed3 Separate AudioService from main 2018-08-16 20:45:17 +02:00
Åke Forslund a66e23d8ab start processess using python -m
- rename process main.py to __main__.py
- update start-mycroft.sh/stop-mycroft.sh scripts to reflect the change
2018-08-16 15:21:22 +02:00
devs-mycroft 2ffc3b7770 Version bump from 18.2.12 to 18.2.13 2018-08-16 13:07:10 +00:00
Åke 90d3d7494c
Merge pull request #1748 from MycroftAI/bugfix/mimic2_tts_normalized_numbers
restrict str.replace from doing a global string replacement
2018-08-16 07:32:38 +02:00
Michael Nguyen a5a119507e restrict str.replace from doing a global string replacement 2018-08-15 19:27:59 -05:00
Matthew D. Scholefield 0859de50b8
Merge pull request #1744 from MycroftAI/bugfix/explicity-dirs
Set the directory explicitly start-mycroft.sh scripts
2018-08-15 17:39:41 -05:00
Steve Penrod 5b8a018766 Remove unused DIR variable 2018-08-15 17:19:30 -05:00
Åke 13f669d514 Set default encoding in a cleaner way (#1745)
- simplify code setting LC_ALL
- Handle other encodings than utf-8
2018-08-15 17:16:34 -05:00
Å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