Commit Graph

1939 Commits (b145e149e66908bdf1c1f3406e13621df93d9352)

Author SHA1 Message Date
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
Matthew D. Scholefield 8c8691e51c Improve skiller.sh a bunch 2017-12-07 15:45:37 -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
Åke Forslund fa430f2ec1 Correct test coverage
Previously the coverage counted the entire mycroft core including things
such as the docs and the tests themself. The inclusion of the actual
tests in the coverage metric scewed the metric quite a bit and the
inclusion of irrelevant files made the information presented by
coveralls cluttered.
2017-12-07 02:45:52 -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
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
Åke Forslund 9591fda4d2 Fix msm messagebus messages.
Previously the msm data messages were not sent correctly, what appeared
on the bus was:
11:25:21.508 - SKILLS - DEBUG - {"type": "msm.install.succeeded", "data": {"skill": "${1}"}, "context": null}

(note the ${1}) instead of the expected:
13:11:41.497 - SKILLS - DEBUG - {"type": "msm.install.succeeded", "data": {"skill": "skill-alarm"}, "context": null}

This was due to the use of ' instead of " around the data field. The
'-strings does not replace variable names with their value.
2017-12-06 03:21:58 -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
Åke a6d86b07c1
Merge pull request #1276 from MycroftAI/bugfix/skill-metrics
Fix skill metrics
2017-12-04 08:34:14 +01:00
Åke 026464b1df
Merge pull request #1277 from MycroftAI/feature/gitignore
Add generated json files to gitignore
2017-12-02 09:37:07 +01:00
Matthew D. Scholefield 255441c204 Add generated json files to gitignore 2017-12-01 18:31:46 -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
devs-mycroft 8a2595e85c Version bump from 0.9.6 to 0.9.7 2017-11-24 15:45:13 +00:00
Åke 95ab32bb86
Merge pull request #1258 from forslund/bugfix/start-speech-client-with-no-net
Handle ConnectionError when retrieving user id in MutableMicrophone
2017-11-24 13:22:17 +01:00
Åke 4a615ae2d4
Merge pull request #1254 from KathyReid/dev
Added section on proxy authentication config, partially resolves #1245
2017-11-24 11:26:27 +01: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
KathyReid 057c440663 Fix extraneous space - typo 2017-11-24 20:05:17 +11: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
KathyReid f18c712d53 Added section on proxy authentication configuration, partially resolves #1245 2017-11-24 00:29:43 +11:00
Åke Forslund dd9ffbac8f Fix handling of unicode strings in dialog renerer 2017-11-23 14:16:04 +01:00
Åke 941e01ad34
Merge pull request #1247 from MycroftAI/feature/metrics
Add general metrics reporting
2017-11-23 09:02:15 +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
Åke c9ac67d15b
Merge pull request #1250 from MycroftAI/feature/fix-1242
Fix viseme bug from PR #1242
2017-11-23 00:22:52 +01: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