Commit Graph

1756 Commits (80a37ec46a65c20d4e1da5a86e65bfbf5b36973a)

Author SHA1 Message Date
Åke 80a37ec46a Move Mark-1 specific image code from api to mark-1 enclosure (#1767)
* Fix removing of the active user

* Move image drawing routines to enclosure client
2018-08-28 14:50:03 -05:00
Åke 129b9456e9
Merge pull request #1770 from MycroftAI/feature/python3isms
Address Python 3 changes
2018-08-28 20:56:41 +02:00
Steve Penrod 97138ae403 Address Python 3 changes 2018-08-28 12:41:59 -05:00
Åke 787ff63d2b Remove trailing references to MycroftSkill.emitter (#1768)
- references in skill_tester.py
- when going through the methods to check for decorations the emitter
was triggered and generated a Warning
2018-08-28 12:26:46 -05:00
Steve Penrod 496c0d1134 Fix Codacy warning... 2018-08-27 16:31:31 -05:00
Steve Penrod 741bd92a26 Fix PEP8 issue created by accidental code merge
Some debugging code got mixed in the merge for #1761, creating a PEP8 error
2018-08-27 16:16:22 -05:00
Steve Penrod e1ab1c2a47 Merge branch 'feature/simple-audio' of git://github.com/forslund/mycroft-core into forslund-feature/simple-audio
# Conflicts:
#	mycroft/audio/services/simple/__init__.py
2018-08-27 14:32:45 -05:00
Åke 85ae69597b Separate enclosure api from enclosure client (#1760)
This is a step towards abstracting the idea of an Enclosure which ties Mycroft to the hardware that is running Mycroft.

- Move the enclosure API to mycroft.enclosure.api (previously was mycroft.client.enclosure.api)
- Move display_manager out of enclosure client to mycroft.enclosure.display_manager
- Merge EnclosureWeather into EnclosureMouth
- Wrap display manager in a class
2018-08-27 13:44:12 -05:00
Åke 7c6ddb0847 Fix voc_match_cache member (#1765)
Seems like a rebase/merge moved this one around. It's now moved back into
__init__
2018-08-27 12:58:15 -05:00
Åke Forslund 4e779d535b Update docstring for render to match behaviour 2018-08-27 13:42:58 +02:00
Steve Penrod a3f1179897 Unify vocab/regex/dialog under new 'locale' directory
* Add MycroftSkill.find_resource() that locates a localization resource file
  from either under the old vocab/regex/dialog folder, or under any folder in
  the new 'locale' folder.  The locale folder unifies the three different
  folders and allows arbitrary subfolders underneath it.
* MycroftSkill.speak_dialog() will now speak the entry name if no dialog file
  is found.  Periods are replaced with spaces, so
  ```self.speak_dialog("this.is.a.test.")``` would return "this is a test" if
  no file named this.is.a.test.dialog is found.
* Remove MycroftSkills.vocab_dir value
* Minor edits to several docstrings
2018-08-27 13:28:46 +02:00
Åke 1e17caa928 Fix fudge-ups when replacing emitter/ws with bus (#1763)
A couple of instances in the mpg123 audio backend didn't contain 'self.', this resolves those allowing the backend to be used again.
2018-08-27 04:13:24 -05:00
Å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 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 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
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
Å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
Michael Nguyen a5a119507e restrict str.replace from doing a global string replacement 2018-08-15 19:27:59 -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
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 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 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 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
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