Commit Graph

1964 Commits (136f1af8c3a82beb669ada69e188ae447c98ebec)

Author SHA1 Message Date
Åke Forslund 0d4a841d4e Make test_api slightly more robust 2017-09-14 11:01:32 +02:00
Åke beb384d28b Merge pull request #1075 from MycroftAI/feature/issue-1074
Add "audio" service to start.sh help.
2017-09-14 10:29:49 +02:00
aatchison d8489a312e Commit headline -- not longer than this line (50)
==== Fixed Issues ====

====  Documentation Notes ====
2017-09-14 12:39:23 +09:00
Åke Forslund d750935fe3 Allow any bitrate of audio to the MycroftSTT
====  Tech Notes ====
Setting the convert_rate enforces the output bitrate of the FLAC audio.

This requires update of speechrecognition (3.7.1) and PyAudio (0.2.11)

==== Environment Notes ====
PyAudio => 0.2.11
speechrecognition => 3.7.1
2017-09-13 14:31:36 -05:00
Åke Forslund a33c07621b Reduce configuration loading in module scope
====  Tech Notes ====
Autoloading configuration in submodules is bad for testing purposes and
should be reduced. It takes time and adds the possibility of altering
the base conditions for the tests

- mycroft/skills/core: global configuration moved to main.py
- mycroft/messagebus/client/ws.py global config moved to __init__ of
Websocket
- client/speech/mic.py global config moved to ResponsiveRecognizer
__init__() method
- client/enclosure/display_manager.py
 - get_ipc_directory() called in methods where used
2017-09-13 12:51:48 -05:00
Åke Forslund 14f931e046 Fix send pairing utterance before loading skills
====  Tech Notes ====
Add a wait until skills have been loaded once before checking for
internet connection. If not an "I'm sorry I didn't catch that" may be
emitted since the pairing skill isn't loaded.
2017-09-13 12:49:31 -05:00
Åke Forslund 31701fc05d Add more safety around the context manager
====  Tech Notes ====
- Sanity check Message in handle_add_context(), 'word' needs to be a
string before calling into the context manager.
- Sanity check Message in handle_remove_context(), make sure a context
keyword was received before trying to remove.
- Docstrings
- Suppress exceptions while injecting context
2017-09-13 12:44:35 -05:00
Åke Forslund 64baa7d420 Enclosure mutes the mic and should unmute it
====  Tech Notes ====
Listens for 'mycroft.paired' and will unmute the mic when this occurs.
This was handled by the pairing skill but for clarity it should be
unmuted at the same place.
2017-09-13 12:02:27 -05:00
Åke Forslund e9f8d85040 Make mic mute counting instead of boolean
====  Tech Notes ====
Mute was previously a simple boolean meaning that if two parts of the
code wanted to mute it it would unmute the mic as soon as the first of
the two pieces of code wanted to unmute.

For example tts output will mute the mic and unmute it when the audio
output is complete. During first start up of a mark-1 the enclosure
mutes the mic and expects it to be muted until the pairing is complete.
This doesn't work. The mic get's unmuted as soon as the first sentence
has been spoken.

This counts the number of times mute is called and will not unmute until
as many unmute calls has been made.
2017-09-13 12:02:27 -05:00
Åke Forslund 65fa735a3a Fix isSpeaking
====  Tech Notes  ====
isSpeaking was lowered as soon a the tts had synthesized the audio and
not when the output finished. This commit moves the signal
raising/lowering to the tts instead of the 'mycroft.speak' handler.
2017-09-13 12:02:27 -05:00
esoleyman c8c5afdeaf Change instance of ConfigurationManager().get to ConfigurationManager.get 2017-09-13 10:41:02 -05:00
Åke Forslund 5ddf1250ab Fix issues discovered by codacity. 2017-09-12 15:07:20 -05:00
Åke Forslund df8fe650c8 Update docstrings after PR feedback 2017-09-12 15:07:20 -05:00
Åke Forslund f1c6912d43 Add event scheduler
====  Tech Notes ====
A single thread handling scheduled events. The skills interact with this
using the self.schedule_event() self.schedule_repeating_event
self.update_event() and self.remove_event().

This is an improvement over scheduledSkill since each skill creates
their own Thread and has to handle storing/restoring scheduled events
between starts.

All pending events are stored in a json file at shutdown for future
sessions.

====  Documentation Notes ====
Needs to be documented

==== Protocol Notes ====
new messagebus event handlers:
- mycroft.scheduler.schedule_event
- mycroft.scheduler.remove_event
- mycroft.scheduler.update_event
2017-09-12 15:07:20 -05:00
Michael Nguyen 162b37ffbd Merge pull request #1063 from forslund/test/api-stt
Test api/stt
2017-09-12 10:14:16 -05:00
Matthew D. Scholefield 5b31047ccd Add check to see if on master branch in msm 2017-09-11 20:12:29 -05:00
Åke Forslund 72a318cd92 make skill id hash of skill directory
====  Tech Notes ====
To ensure that the skills have the same id when loading the id was
replaced with a hash of the skill directory. (as long the skill isn't
 renamed). This is useful for things like the event_scheduler where
skills are referenced using the skill id and has info being persistent
over restarts
2017-09-11 19:43:02 -05:00
Michael Nguyen c814c8e326 Merge pull request #1066 from MycroftAI/bugfix/Readme
Fix links on README
2017-09-11 15:58:12 -05:00
Michael Nguyen 8d9b291ec0 Update README.md 2017-09-11 15:21:39 -05:00
Michael Nguyen 80c855c38d Update README.md 2017-09-11 15:17:23 -05:00
Michael Nguyen 5fcf0158aa Update README.md 2017-09-11 15:16:49 -05:00
Åke Forslund fd75b05e82 Add tests for api module 2017-09-11 20:31:23 +02:00
Michael Nguyen eb6340265b Merge pull request #1060 from forslund/feature/ignore-enclosure-mouth-update-messages
Ignore enclosure.mouth.display message by default
2017-09-08 10:38:40 -05:00
Åke dd49219438 Merge pull request #1058 from MycroftAI/feature/notify-update
====  Tech Notes  
-Notification on dependency changes by comparing hashes of current requirements.txt and dev_setup script and last time the dev_setup.sh was run
- Update padatious to v0.2.2
2017-09-07 23:24:44 +02:00
Åke Forslund 0c8aaa2664 Ignore enclosure.mouth.display message by default
====  Tech Notes ====
Add 'enclosure.mouth.display' to ignore_logs default configuration since
it will get called alot and spam the skills log.
2017-09-07 15:59:34 +02:00
Åke Forslund 4386fe1f04 Add tests for stt module 2017-09-07 15:21:58 +02:00
Matthew D. Scholefield 9efcc01ce0 Update padatious 2017-09-06 19:22:33 -05:00
Matthew D. Scholefield 92cf04aad4 Add update notification 2017-09-05 15:46:24 -05:00
Brian Hopkins c2aa2ebb97 fixing typo (#1052)
* fixing typo

fixing color function
2017-09-04 00:49:08 +02:00
Åke 66453cbf9c Merge pull request #1015 from azie-ginanjar/make_message_optional
make message parameter on intent handler optional

====  Tech Notes ====
intent handlers that don't use the message bus message no longer need to have the argument so a simple intent handler could be

    def handle_yahoo(self):
        self.speak('Yahoo')
2017-09-02 14:29:25 +02:00
Åke Forslund 8420ec302c intent_service is OBVIOUSLY not a package 2017-09-01 15:29:08 -05:00
Åke 27dba0c786 Merge branch 'dev' into make_message_optional 2017-09-01 21:29:16 +02:00
jarbasai b6e89f02b0 pep8 2017-09-01 12:28:37 -05:00
Jarbas c05590bc7c save utterances 2017-09-01 12:28:37 -05:00
Åke Forslund 51f107f3e2 Fix required package intent_service
====  Tech Notes  ====
old intent directory was expected instead of intent_service
2017-09-01 12:05:24 -05:00
Matthew D. Scholefield ef759ce825 Add sphinx documentation 2017-09-01 12:01:59 -05:00
Åke Forslund c7c25cc01b Fix errors during shutdown
====  Tech Notes ====
Skills weren't cleanly shutdown. This ensures that skills are shutdown more cleanly and that shutdown procedure will not be interrupted by broken shutdown methods.

Shutdown of reload thread fixed

Unused globals removed
2017-09-01 10:53:22 -05:00
Åke Forslund 2881b1842f Setting storage is no longer forced at shutdown
Risk of corruption if the skill service was terminated while settings
were written was determined to be greater than any benefit from this.
2017-09-01 10:45:05 -05:00
Åke Forslund 0782064819 Write settings dict to disk more frequently
====  Tech Notes ====
After an intent has been handled the settings will be stored if any changes are detected.

A force option was added to the .store method of the settings class which always writes the dict to disk even if no changes has been made. This is used during shutdown.
2017-09-01 10:45:05 -05:00
Åke b1d02edf80 Merge pull request #1042 from MycroftAI/feature/script_tamer
Tame the mycroft.sh script

====  Tech Notes  ====
Try to shut down services cleanly by sending ^C and if that fails the skills are terminated hard.
2017-09-01 16:07:15 +02:00
Steve Penrod 370b51ff6a Tame the mycroft.sh script
The mycroft.sh script uses the 'screen' command to run the various
processes that make up Mycroft Core.  When they are stopped with
"./mycroft.sh stop", it was using the screen 'quit' command.  This
ends the process abruptly, not allowing services to shutdown
cleanly.

This changes it to send a shutdown request first, equivalent of a
Ctrl-C.  If the service doesn't shutdown after 2 seconds it is
then killed.

This specifically prevents issues where a skill expected and did
not receive a call to the shutdown() method.
2017-08-31 17:53:30 -07:00
Michael Nguyen 01a7868d49 Merge pull request #1003 from forslund/test-skills-core
Test skills core
2017-08-31 16:00:14 -05:00
Michael Nguyen 995d67e612 Merge pull request #1018 from forslund/bugfix/issue-1014
Bugfix/issue 1014
2017-08-31 15:59:32 -05:00
Michael Nguyen 2dc6e47bea Merge pull request #1020 from forslund/bugfix/issue-1019
Fix expect response for speak_dialog
2017-08-31 15:58:54 -05:00
Michael Nguyen e7775d26d0 Merge pull request #1026 from forslund/bugfix/issue-1022
Fix failure when using one_of in intents
2017-08-31 15:58:38 -05:00
Michael Nguyen 2dab08f483 Merge pull request #1035 from forslund/bugfix/localization
Bugfix/localization
2017-08-31 15:58:02 -05:00
Åke Forslund 144e9c016c Automatically find skill directory in __init__
====  Tech Notes ====
Previously the _dir parameter was poplated from the skill loader between calling __init__() and initialize(). The skill path can however be gleaned from with in the __init__() of MycroftSkill.

Doing this makes the settings accessable from __init__() as well and will allow a more straight forward usage.
2017-08-31 15:54:46 -05:00
Åke Forslund d746a87e34 Added docstring for update_context
Including note about not working on one_of keywords.
2017-08-31 21:34:30 +02:00
Åke 14254893cf Merge pull request #1023 from MatthewScholefield/feature/module-imports
====  Tech Notes ==== 
Adds the most commonly used methods and classes in more convenient location

Changing from mycroft.skills.core import MycroftSkill to simply from mycroft import MycroftSkill

====  Documentation Notes ==== 
The skill tutorial should be updated to use these shorter import paths.
2017-08-31 14:13:00 +02:00
Steve Penrod ae2583662f Correcting CLI handling of main() for issue #1036
The idiom for handling main() was incorrect to allow the CLI
to be invoked by the mycroft-cli-clent script.

==== Fixed Issues ====
2017-08-30 22:45:16 -05:00