Commit Graph

2115 Commits (637166e624b408013ab2b0325b6f5d55ba9a4770)

Author SHA1 Message Date
Åke 637166e624 Revert "Remove reliance on hashed meta (#2076)"
This reverts commit 38123a1fc3.
2019-04-05 17:57:06 +02:00
Åke 38123a1fc3 Remove reliance on hashed meta (#2076)
* Fix skill_gid for modified skills

Used the old '_' after device uuid

* Identify skill using gid

When receiving data from server the "identifier" entry is now removed and in it's stead the skill_gid should be used.

This also removes the "fetch other settings" functionallity since that is no longer relevant.
2019-04-04 02:03:08 -05:00
Åke Forslund f60d2372bb Add missing license header 2019-04-02 18:26:44 +02:00
Åke 82fa314ce9 Feature/skillsmeta gid (#2074)
* Add global id basics to settings meta

- All skills will upload a blank settingsmeta
- a skill_gid will be appended to all settingsmeta upload-data
- Added basic function for generating skill_gid

* Use new skill_gid field.

Populate skill_gid directly from metadata

* Separate travis tmp-dirs

- Update travis script to use tempdir for each python version
- Update test script to handle nonstandard tempdirs
- Generate msm folder using tempdir when running create_msm test

* Add title field with pretty name

* Collect and expand "title" as needed

For title use market-place title or name in settings meta or skillname

* Switch skill_manager create_msm test to 19.02

* Remove leading / trailing Skill in display name

Also rename title displayname to match new mycroft-skills-data

* Lock msm_create and mock the name info test_settings
2019-04-02 11:14:49 -05:00
devs-mycroft 6706c37782 Version bump from 19.2.1 to 19.2.2 2019-03-29 00:07:49 +00:00
Åke Forslund 466f187eb7 Remove extra LOG statement 2019-03-28 23:29:07 +01:00
Åke d2e6d310ad Run normalized also when raw matches None (#2073)
If no match was found for the non-normalized utterance it would jump to
the exception handler for StopIteration skipping the normalized step
altogether

This changes the next/StopIteration system for list comprehensions
2019-03-28 15:43:28 -05:00
Åke Forslund 381999d5a8 Minor issues
- padatious sentence defaults
- A bit more explanation about the adapt message utterance
2019-03-28 14:50:50 +01:00
Steve Penrod 342c730a97 Normalize utterances before intent handling
Previously Padatious intent matches were performed on non-normalized text, meaning that things like "what's the weather" wouldn't match a Padatious intent but
"what is the weather" would.

The "utterance" in Adapt intent data will still be non-normalized even if the intent match occurred on a normalized utterance. Retaining the existing behavior.

The "intent_failure" data.  In there, "utterance" is always the raw version, "norm_utt" is the normalized one.

Also added better debugging info for intent matching to the log.

Also addresses a rare issue with the old code where the Adapt context could
have been updated even if the Adapt intent wasn't actually invoked due to
a higher Padatious intent match.
2019-03-28 14:48:26 +01:00
Åke Forslund 6186afd25f Remove the mimic_fallback_obj at shutdown 2019-03-28 11:15:45 +01:00
Ruthvicp ba305c5bfc separate the cache & avoid voice overlap
- The cache is now stored in a TTS specific directory
- Only a single fallback-tts is created
2019-03-28 10:40:02 +01:00
jarbasal 64a58f3290 tonight remainder 2019-03-27 11:15:24 +00:00
Ruthvicp b28011681e handling tonight in date & time extraction (#2066)
* handling tonight in date & time extraction
2019-03-27 01:41:50 -05:00
Åke feb82a2bb1 Add the SkillGUI method send_event() (#2057)
* Add the SkillGUI method send_event()

Sends raw mycroft.events.triggered messages to the gui for the skills namespace.

Example usage:
  self.gui.send_event('event_name' {'param1': 12, 'param2': 'abc'})
2019-03-27 01:22:05 -05:00
jarbasal a788efd1d0 update to new lang scheme 2019-03-26 13:46:04 +01:00
jarbasal 42e258610e feature/format_pt 2019-03-26 13:45:59 +01:00
Åke ca1115979d
Merge pull request #2062 from MycroftAI/feature/timer-translations
Add translations from the Timer skill
2019-03-25 15:33:11 +01:00
Åke Forslund ea0d23b975 Fix day/hour/minute/second translations 2019-03-25 14:52:26 +01:00
Chris Rogers d04ad5f8b0 Remove enum.auto
Replace enum.auto with a similar, custom function. This is for python3.4
compatibility.
2019-03-24 14:07:49 -04:00
Åke e2b70d1fa4
Merge pull request #2060 from MycroftAI/feature/configurable-precise-threshold
Make precise sensitivity configurable
2019-03-22 22:33:49 +01:00
Åke 9eeb8cefc3 Fix mimic 2 long sentences (#2061)
* Fix mimic 2 long sentences

Fixes bug in  the second and third chunking pass incorrectly by
concatinating strings with lists resulting in chunks of single
characters.

* Handle mimic2 chunking correctly

- Move preprocessing from get_tts() to a method called from tts execute,
    this allows all parts to be spoken and the caching to work correctly
- Remove duplicate of phonetic spelling in mimic2_tts
2019-03-22 10:20:06 -05:00
Steve Penrod 93cf07e9ed Add translations from the Timer skill
Moved translated text from the Timer skill into core.  This began
the mycroft-core translation effort for Russian and Turkish!
2019-03-22 09:55:13 -05:00
Matthew D. Scholefield a9fb77a27c Make precise sensitivity configurable 2019-03-21 17:45:38 -05:00
Åke dfa714c56d
Merge pull request #2059 from MycroftAI/feature/padatious-priority
Adjust and document Padatious loose fallback priority
2019-03-21 23:38:25 +01:00
Steve Penrod 41773a039a Adjust and document Padatious loose fallback priority
The loose (conf > 0.5) Padatious match was previously occurring as Fallback
priority 99. The AIML fallback at priority 90 would consume lots of
utterances, interferring with many skills.  Now Padatious runs at priority
89.

Additionally, added documentation of the intent and fallback system, including
guidelines for priorities.
2019-03-21 17:16:07 -05:00
Åke 9f29649fc0 Feature/non hard coded paths (#2058)
* Allow ~ when running ensure_directory_exists

* Add custom paths for websettings cache and system conf
2019-03-21 13:19:11 -05:00
Åke 66f9f3f100
Merge pull request #2012 from MycroftAI/bugfix/audio-protection
Protect against failure to launch WAV/MP3
2019-03-15 10:28:17 +01:00
Steve Penrod 688d0e6704 Protect against failure to launch WAV/MP3/Ogg
The playback of WAV/MP3 could throw exceptions if something went
wrong, which seemed inappropriate.  Now it just generates an error
message in the log.
2019-03-15 09:57:04 +01:00
devs-mycroft 8228b49230 Version bump from 19.2.0 to 19.2.1 2019-03-14 20:54:39 +00:00
Åke Forslund c3f2b73794 set_active_lang on startup of skills 2019-03-14 11:00:51 +01:00
Steve Penrod a5dcc8d3d3 Fix unit test errors 2019-03-14 10:57:31 +01:00
Steve Penrod 44f60ec6f3 Change default lang to None, not English
Much of the code used "en-us" as the default value when not specified.
This limited the internationalization potential.  Changing the default
to None and adds the ability to define the default lang code from other
locations in code.  E.g.

```python

from mycroft.util.lang import set_default_lang

set_default_lang("en-us")
print("English date: "+nice_date(dt))

set_default_lang("de-de")
print("German date: "+nice_date(dt))
```

This allows easier localization of Skills by having the framework set the default without any changes necessary by the Skill writers.

Other minor changes:
* Changed the default return value of get_gender*() to None instead of False
2019-03-14 10:57:31 +01:00
ChristopherRogers1991 ffd58cb4ef Feature/common io t updates (#2050)
* Split ADJUST into ADJUST and SET

* Use enum names instead of values.

* Add properties to CommonIoTSkill

* property -> attribute to avoid conflict with builtin

* Add increase and decrease actions

* Fix copy/paste error
2019-03-13 22:51:54 -05:00
Åke 327511c937 Fix simple audio backend pausing by voice (#2045)
The restore_volume would previously unpause the service even if the user just asked for pausing playback.

This separates the paused flag from the pausing/resuming action so lowering/restoring volume doesn't affect the logical pausing state and can check it to determine if lowering/restoring is needed/wanted.
2019-03-08 02:24:58 -06:00
Åke 20ee4fddf0
Merge pull request #2044 from MycroftAI/feature/simple-audio-pausing
Add pause/resume to simple audio services
2019-03-08 08:46:51 +01:00
Steve Penrod dd25b76be6 Add pause/resume to simple audio services
This adds a very simple mechanism for pausing and resuming audio streams
that are actively playing.  The process is suspended and resumed when
requested.

This also uses that same method to implement lower_volume()/restore_volume() for simple "ducking" of audio.
2019-03-07 17:40:59 -06:00
Steve Penrod cd6db9f645 Bugfix for Mimic2 issues (#2043)
Mimic2 voices has several issues:
* Numeric generation was all goofed up for decimal numbers.  It was
  independently doing number to speech for the values before and after
  the period on a decimal number.  E.g. 1.100 became "one.one hundred".
  Removed local normalization altogether since it is handled
  correctly on the Mimic2 server now.
* Sentence splitting was being applied in the middle of things like
  numbers or abbreviations.  E.g. "I.B.M."
* Chunker algorithms were making unnecessary copies of string arrays

While in there I also:
* Removed several unused imports
* Cleaned up docstrings
* Prefixed private helpers with _
* Added debug logging of mimic2 request text
2019-03-07 14:55:31 -06:00
Åke 526d326ecf Mute the mic while playing the listening "beep" (#2042)
This also extends the stream mute to actually stopping the recording stream while muted.
2019-03-07 13:42:00 -06:00
Steve Penrod 230c3057b4 Give Padatious high and low match passes
Padatious was accepting fairly low confidence matches (0.5).  This
would match a phrase such as "Where is the Empire State Building?" to the
intent "Where were you born?"  (Which is a 0.54 match)

Now there are two passes mad on the Padatious fallback.  The first is
looking for high confidence matches (> 0.8).  Then other fallbacks -- such
as the CommonQuery fallbacks -- have an opportunity to consume the
utterance.  If they don't consume it, Padatious is invoked again with
looser confidence before finally invoking the Unknown fallback.
2019-03-05 03:33:02 -06:00
Andreas Lorensen 6c0cd8d427 Add danish 2 - initial work to get danish to core (#2033)
* Danish formatting and parsing functions
2019-03-04 21:40:12 +01:00
Angel Docampo fdeb66c3e4 Fixed pep8 issues 2019-03-04 15:37:28 +01:00
Angel Docampo 9c22ced394 Initial castillian format translations
This commit add the initial translations of core functions for format
numbers: nice_number_es, pronounce_number_es and nice_time_es.

==== Localization Notes ====
NONE - Castillian (Spain's spanish)
2019-03-04 15:37:10 +01:00
devs-mycroft 5f714957d4 Version bump from 19.2.-1 to 19.2.0 2019-02-28 23:32:21 +00:00
Steve Penrod 286fa6314f Imporove user feedback during startup
Now the eyes go to a khaki color and "< < < LOADING < < <" displays
during the skill startup.  When Padatious finishes the first training
we now emit a "mycroft.ready" on the messagebus.

A change to the skill_mark_1 to look for "mycroft.ready" instead of
"mycroft.skills.initialized" provides a good visual change to show that
it is ready for use.
2019-02-28 14:58:19 -06:00
Åke 5529acde12
Merge pull request #2030 from MycroftAI/bugfix/hide-warnings
Hide deprecated warning in certain cases
2019-02-28 21:12:17 +01:00
Steve Penrod f5025f5eaf Fix PEP8 2019-02-28 13:15:03 -06:00
Steve Penrod 419a8c531d Hide deprecated warning in certain cases
The deprecation warning was firing off at the load of every skill when
the decorators are being iterated through by internal code (which
includes the self.config with an @property).  Add check for these
special cases to not show a warning.
2019-02-28 13:11:07 -06:00
Steve Penrod 603973ecf3 Typo in Common Query 'encolsure'
Fixed a type in the Common Query scoring system that broke a bonus check.
2019-02-28 12:39:38 -06:00
Åke 0c111bb60c
Merge pull request #2028 from MycroftAI/bugfix/inhibit-visemes
Activate/deactivate visemes on command
2019-02-28 16:53:38 +01:00
Åke Forslund 3d366013b9 Activate/deactivate visemes on command
When showing text the visemes would overwrite it. This inhibits the visemes when mouth events are turned off and reenables them when activated.
2019-02-28 16:04:43 +01:00